Skip to content

Commit

Permalink
Sync IntlDateFormatter docs with EN (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Dec 10, 2023
1 parent 0777277 commit da73939
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
22 changes: 21 additions & 1 deletion reference/intl/dateformatter/create.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 184082814f268f881bf7834c5400e1981140d8ea Maintainer: yannick Status: ready -->
<!-- EN-Revision: b2332afcd09ceceed83d1e82ad94d7734012bd6f Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="intldateformatter.create" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -217,6 +217,26 @@ $fmt = new IntlDateFormatter( "de-DE" ,IntlDateFormatter::FULL, IntlDateFormatte
'America/Los_Angeles',IntlDateFormatter::GREGORIAN , "MM/dd/yyyy");
echo "Le deuxième format est affiché avec le modèle : ".$fmt->format(0);
?>
]]>
</programlisting>
</example>
<example>
<title>Exemple de gestion de locale invalide</title>
<programlisting role="php">
<![CDATA[
<?php
try {
$fmt = new IntlDateFormatter(
'locale_invalide',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'je_ne_sais_pas',
IntlDateFormatter::GREGORIAN,
);
} catch (\Error $e) {
// ...
}
?>
]]>
</programlisting>
</example>
Expand Down
22 changes: 21 additions & 1 deletion reference/intl/dateformatter/get-calendar.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 1976eae0d815797af97a1e16c5cd90ffc2868395 Maintainer: yannick Status: ready -->
<!-- EN-Revision: b2332afcd09ceceed83d1e82ad94d7734012bd6f Maintainer: yannick Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="intldateformatter.getcalendar" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -96,6 +96,26 @@ echo 'Le calendrier est maintenant : ' . $fmt->getCalendar();
]]>
</programlisting>
</example>
<example>
<title>Exemple de gestion de locale invalide</title>
<programlisting role="php">
<![CDATA[
<?php
try {
$fmt = new IntlDateFormatter(
'locale_invalide',
IntlDateFormatter::FULL,
IntlDateFormatter::FULL,
'je_ne_sais_pas',
IntlDateFormatter::GREGORIAN,
);
} catch (\Error $e) {
// ...
}
?>
]]>
</programlisting>
</example>
&example.outputs;
<screen>
<![CDATA[
Expand Down

0 comments on commit da73939

Please sign in to comment.