mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Merging the updated Limesurvey 1.92+ branch of queXS to trunk
This commit is contained in:
@@ -1,292 +1,292 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Date and Time Converter - Currently Supported & Coming
|
||||
Soon Date/Time Formats</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
.style17 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 14;
|
||||
}
|
||||
|
||||
.style20 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #006600;
|
||||
}
|
||||
|
||||
.style22 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 24px;
|
||||
color: #990000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.style24 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
color: #006699;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<span class="style17">This is a list of PHP date() style
|
||||
date/time formats that the "Date and Time Converter" class currently
|
||||
supports and also formats that I plan on implementing in the near
|
||||
future. This table was copied from the PHP manual and modified. <a
|
||||
href="http://www.php.net/date" target="_blank">php.net/date</a></span>
|
||||
<br>
|
||||
<p align="center" class="style20">Currently Supported Date/Time
|
||||
Formats</p>
|
||||
|
||||
<TABLE width="100%" border="1"
|
||||
summary="The following characters are recognized in the format parameter string">
|
||||
<COLGROUP>
|
||||
<COL>
|
||||
<COL>
|
||||
<COL>
|
||||
</COLGROUP>
|
||||
<THEAD>
|
||||
<TR>
|
||||
<TH width="128" class="style17"><I>format</I> character</TH>
|
||||
<TH class="style17">Description</TH>
|
||||
<TH width="300" class="style17">Example returned values</TH>
|
||||
</TR>
|
||||
</THEAD>
|
||||
<TBODY>
|
||||
|
||||
<TR>
|
||||
<TD align="middle" class="style24">Day</TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">d</TD>
|
||||
<TD class="style17">Day of the month, 2 digits with leading
|
||||
zeros</TD>
|
||||
<TD class="style17">01 to 31</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">j</TD>
|
||||
<TD class="style17">Day of the month without leading zeros</TD>
|
||||
<TD class="style17">1 to 31</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">S</TD>
|
||||
<TD class="style17">English ordinal suffix for the day of the
|
||||
month, 2 characters</TD>
|
||||
<TD class="style17">st, nd, rd or th. Works well with j</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">D</TD>
|
||||
<TD class="style17">A textual representation of a day, three
|
||||
letters</TD>
|
||||
<TD class="style17">Mon through Sun</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="middle" class="style24">Month</TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">m</TD>
|
||||
<TD class="style17">Numeric representation of a month, with
|
||||
leading zeros</TD>
|
||||
<TD class="style17">01 through 12</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">M</TD>
|
||||
<TD class="style17">A short textual representation of a month,
|
||||
three letters</TD>
|
||||
<TD class="style17">Jan through Dec</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">n</TD>
|
||||
<TD class="style17">Numeric representation of a month, without
|
||||
leading zeros</TD>
|
||||
<TD class="style17">1 through 12</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD align="middle" class="style24"><EM>Year</EM></TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">o</TD>
|
||||
<TD class="style17">ISO-8601 year number. This has the same
|
||||
value as Y, except that if the ISO week number (W) belongs to the
|
||||
previous or next year, that year is used instead. (added in PHP
|
||||
5.1.0)</TD>
|
||||
<TD class="style17">Examples: 1999 or 2003</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">Y</TD>
|
||||
<TD class="style17">A full numeric representation of a year, 4
|
||||
digits</TD>
|
||||
<TD class="style17">Examples: 1999 or 2003</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">y</TD>
|
||||
<TD class="style17">A two digit representation of a year</TD>
|
||||
<TD class="style17">Examples: 99 or 03</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="middle" class="style24"><EM>Time</EM></TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">a</TD>
|
||||
<TD class="style17">Lowercase Ante meridiem and Post meridiem</TD>
|
||||
<TD class="style17">am or pm</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">A</TD>
|
||||
<TD class="style17">Uppercase Ante meridiem and Post meridiem</TD>
|
||||
<TD class="style17">AM or PM</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">g</TD>
|
||||
<TD class="style17">12-hour format of an hour without leading
|
||||
zeros</TD>
|
||||
<TD class="style17">1 through 12</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">G</TD>
|
||||
<TD class="style17">24-hour format of an hour without leading
|
||||
zeros</TD>
|
||||
<TD class="style17">0 through 23</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">h</TD>
|
||||
<TD class="style17">12-hour format of an hour with leading zeros</TD>
|
||||
<TD class="style17">01 through 12</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">H</TD>
|
||||
<TD class="style17">24-hour format of an hour with leading zeros</TD>
|
||||
<TD class="style17">00 through 23</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">i</TD>
|
||||
<TD class="style17">Minutes with leading zeros</TD>
|
||||
<TD class="style17">00 to 59</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">s</TD>
|
||||
<TD class="style17">Seconds, with leading zeros</TD>
|
||||
<TD class="style17">00 through 59</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
<center><br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span class="style22">Date/Time Formats Coming Soon! </span><br>
|
||||
</center>
|
||||
<TABLE width="100%" border="1"
|
||||
summary="The following characters are recognized in the format parameter string">
|
||||
<COLGROUP>
|
||||
<COL>
|
||||
<COL>
|
||||
<COL>
|
||||
</COLGROUP>
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TH width="133" class="style17"><I>format</I> character</TH>
|
||||
<TH class="style17">Description</TH>
|
||||
<TH width="386" class="style17">Example returned values</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">u</TD>
|
||||
<TD class="style17">Milliseconds (added in PHP 5.2.2)</TD>
|
||||
<TD class="style17">Example: 54321</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">O</TD>
|
||||
<TD class="style17">Difference to Greenwich time (GMT) in hours</TD>
|
||||
<TD class="style17">Example: +0200</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">P</TD>
|
||||
<TD class="style17">Difference to Greenwich time (GMT) with
|
||||
colon between hours and minutes (added in PHP 5.1.3)</TD>
|
||||
<TD class="style17">Example: +02:00</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">c</TD>
|
||||
<TD class="style17">ISO 8601 date (added in PHP 5)</TD>
|
||||
<TD class="style17">2004-02-12T15:19:21+00:00</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">r</TD>
|
||||
<TD class="style17">» RFC 2822 formatted date</TD>
|
||||
<TD class="style17">Example: Thu, 21 Dec 2000 16:01:07 +0200</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">U</TD>
|
||||
<TD class="style17">Seconds since the Unix Epoch (January 1 1970
|
||||
00:00:00 GMT)</TD>
|
||||
<TD class="style17">See also time()</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">l (lowercase 'L')</TD>
|
||||
<TD class="style17">A full textual representation of the day of
|
||||
the week</TD>
|
||||
<TD class="style17">Sunday through Saturday</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">N</TD>
|
||||
<TD class="style17">ISO-8601 numeric representation of the day
|
||||
of the week (added in PHP 5.1.0)</TD>
|
||||
<TD class="style17">1 (for Monday) through 7 (for Sunday)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">w</TD>
|
||||
<TD class="style17">Numeric representation of the day of the
|
||||
week</TD>
|
||||
<TD class="style17">0 (for Sunday) through 6 (for Saturday)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">z</TD>
|
||||
<TD class="style17">The day of the year (starting from 0)</TD>
|
||||
<TD class="style17">0 through 365</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">W</TD>
|
||||
<TD class="style17">ISO-8601 week number of year, weeks starting
|
||||
on Monday (added in PHP 4.1.0)</TD>
|
||||
<TD class="style17">Example: 42 (the 42nd week in the year)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">F</TD>
|
||||
<TD class="style17">A full textual representation of a month,
|
||||
such as January or March</TD>
|
||||
<TD class="style17">January through December</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">t</TD>
|
||||
<TD class="style17">Number of days in the given month</TD>
|
||||
<TD class="style17">28 through 31</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Date and Time Converter - Currently Supported & Coming
|
||||
Soon Date/Time Formats</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
.style17 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 14;
|
||||
}
|
||||
|
||||
.style20 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
color: #006600;
|
||||
}
|
||||
|
||||
.style22 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 24px;
|
||||
color: #990000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.style24 {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
font-style: italic;
|
||||
color: #006699;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<span class="style17">This is a list of PHP date() style
|
||||
date/time formats that the "Date and Time Converter" class currently
|
||||
supports and also formats that I plan on implementing in the near
|
||||
future. This table was copied from the PHP manual and modified. <a
|
||||
href="http://www.php.net/date" target="_blank">php.net/date</a></span>
|
||||
<br>
|
||||
<p align="center" class="style20">Currently Supported Date/Time
|
||||
Formats</p>
|
||||
|
||||
<TABLE width="100%" border="1"
|
||||
summary="The following characters are recognized in the format parameter string">
|
||||
<COLGROUP>
|
||||
<COL>
|
||||
<COL>
|
||||
<COL>
|
||||
</COLGROUP>
|
||||
<THEAD>
|
||||
<TR>
|
||||
<TH width="128" class="style17"><I>format</I> character</TH>
|
||||
<TH class="style17">Description</TH>
|
||||
<TH width="300" class="style17">Example returned values</TH>
|
||||
</TR>
|
||||
</THEAD>
|
||||
<TBODY>
|
||||
|
||||
<TR>
|
||||
<TD align="middle" class="style24">Day</TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">d</TD>
|
||||
<TD class="style17">Day of the month, 2 digits with leading
|
||||
zeros</TD>
|
||||
<TD class="style17">01 to 31</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">j</TD>
|
||||
<TD class="style17">Day of the month without leading zeros</TD>
|
||||
<TD class="style17">1 to 31</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">S</TD>
|
||||
<TD class="style17">English ordinal suffix for the day of the
|
||||
month, 2 characters</TD>
|
||||
<TD class="style17">st, nd, rd or th. Works well with j</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">D</TD>
|
||||
<TD class="style17">A textual representation of a day, three
|
||||
letters</TD>
|
||||
<TD class="style17">Mon through Sun</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="middle" class="style24">Month</TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">m</TD>
|
||||
<TD class="style17">Numeric representation of a month, with
|
||||
leading zeros</TD>
|
||||
<TD class="style17">01 through 12</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">M</TD>
|
||||
<TD class="style17">A short textual representation of a month,
|
||||
three letters</TD>
|
||||
<TD class="style17">Jan through Dec</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">n</TD>
|
||||
<TD class="style17">Numeric representation of a month, without
|
||||
leading zeros</TD>
|
||||
<TD class="style17">1 through 12</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD align="middle" class="style24"><EM>Year</EM></TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">o</TD>
|
||||
<TD class="style17">ISO-8601 year number. This has the same
|
||||
value as Y, except that if the ISO week number (W) belongs to the
|
||||
previous or next year, that year is used instead. (added in PHP
|
||||
5.1.0)</TD>
|
||||
<TD class="style17">Examples: 1999 or 2003</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">Y</TD>
|
||||
<TD class="style17">A full numeric representation of a year, 4
|
||||
digits</TD>
|
||||
<TD class="style17">Examples: 1999 or 2003</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">y</TD>
|
||||
<TD class="style17">A two digit representation of a year</TD>
|
||||
<TD class="style17">Examples: 99 or 03</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD align="middle" class="style24"><EM>Time</EM></TD>
|
||||
<TD class="style17">---</TD>
|
||||
<TD class="style17">---</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">a</TD>
|
||||
<TD class="style17">Lowercase Ante meridiem and Post meridiem</TD>
|
||||
<TD class="style17">am or pm</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">A</TD>
|
||||
<TD class="style17">Uppercase Ante meridiem and Post meridiem</TD>
|
||||
<TD class="style17">AM or PM</TD>
|
||||
</TR>
|
||||
|
||||
<TR>
|
||||
<TD class="style17">g</TD>
|
||||
<TD class="style17">12-hour format of an hour without leading
|
||||
zeros</TD>
|
||||
<TD class="style17">1 through 12</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">G</TD>
|
||||
<TD class="style17">24-hour format of an hour without leading
|
||||
zeros</TD>
|
||||
<TD class="style17">0 through 23</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">h</TD>
|
||||
<TD class="style17">12-hour format of an hour with leading zeros</TD>
|
||||
<TD class="style17">01 through 12</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">H</TD>
|
||||
<TD class="style17">24-hour format of an hour with leading zeros</TD>
|
||||
<TD class="style17">00 through 23</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">i</TD>
|
||||
<TD class="style17">Minutes with leading zeros</TD>
|
||||
<TD class="style17">00 to 59</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">s</TD>
|
||||
<TD class="style17">Seconds, with leading zeros</TD>
|
||||
<TD class="style17">00 through 59</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
<center><br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<span class="style22">Date/Time Formats Coming Soon! </span><br>
|
||||
</center>
|
||||
<TABLE width="100%" border="1"
|
||||
summary="The following characters are recognized in the format parameter string">
|
||||
<COLGROUP>
|
||||
<COL>
|
||||
<COL>
|
||||
<COL>
|
||||
</COLGROUP>
|
||||
<TBODY>
|
||||
<TR>
|
||||
<TH width="133" class="style17"><I>format</I> character</TH>
|
||||
<TH class="style17">Description</TH>
|
||||
<TH width="386" class="style17">Example returned values</TH>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">u</TD>
|
||||
<TD class="style17">Milliseconds (added in PHP 5.2.2)</TD>
|
||||
<TD class="style17">Example: 54321</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">O</TD>
|
||||
<TD class="style17">Difference to Greenwich time (GMT) in hours</TD>
|
||||
<TD class="style17">Example: +0200</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">P</TD>
|
||||
<TD class="style17">Difference to Greenwich time (GMT) with
|
||||
colon between hours and minutes (added in PHP 5.1.3)</TD>
|
||||
<TD class="style17">Example: +02:00</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">c</TD>
|
||||
<TD class="style17">ISO 8601 date (added in PHP 5)</TD>
|
||||
<TD class="style17">2004-02-12T15:19:21+00:00</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">r</TD>
|
||||
<TD class="style17">» RFC 2822 formatted date</TD>
|
||||
<TD class="style17">Example: Thu, 21 Dec 2000 16:01:07 +0200</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">U</TD>
|
||||
<TD class="style17">Seconds since the Unix Epoch (January 1 1970
|
||||
00:00:00 GMT)</TD>
|
||||
<TD class="style17">See also time()</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">l (lowercase 'L')</TD>
|
||||
<TD class="style17">A full textual representation of the day of
|
||||
the week</TD>
|
||||
<TD class="style17">Sunday through Saturday</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">N</TD>
|
||||
<TD class="style17">ISO-8601 numeric representation of the day
|
||||
of the week (added in PHP 5.1.0)</TD>
|
||||
<TD class="style17">1 (for Monday) through 7 (for Sunday)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">w</TD>
|
||||
<TD class="style17">Numeric representation of the day of the
|
||||
week</TD>
|
||||
<TD class="style17">0 (for Sunday) through 6 (for Saturday)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">z</TD>
|
||||
<TD class="style17">The day of the year (starting from 0)</TD>
|
||||
<TD class="style17">0 through 365</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">W</TD>
|
||||
<TD class="style17">ISO-8601 week number of year, weeks starting
|
||||
on Monday (added in PHP 4.1.0)</TD>
|
||||
<TD class="style17">Example: 42 (the 42nd week in the year)</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">F</TD>
|
||||
<TD class="style17">A full textual representation of a month,
|
||||
such as January or March</TD>
|
||||
<TD class="style17">January through December</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD class="style17">t</TD>
|
||||
<TD class="style17">Number of days in the given month</TD>
|
||||
<TD class="style17">28 through 31</TD>
|
||||
</TR>
|
||||
</TBODY>
|
||||
</TABLE>
|
||||
<br>
|
||||
<br>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,308 +1,308 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Date and Time Converter - Examples, Usage, and Syntax</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.style14 {
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style30 {
|
||||
color: #006600;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style32 {
|
||||
color: #006699;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style33 {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.style34 {
|
||||
color: #990000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style35 {
|
||||
color: #000000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style36 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.style37 {
|
||||
color: #CC0000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.S18 {
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
span {
|
||||
font-family: 'Verdana';
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.S118 {
|
||||
color: #000033;
|
||||
}
|
||||
|
||||
.S119 {
|
||||
color: #004D00;
|
||||
}
|
||||
|
||||
.S121 {
|
||||
font-style: italic;
|
||||
color: #7F007F;
|
||||
}
|
||||
|
||||
.S122 {
|
||||
color: #FF822E;
|
||||
}
|
||||
|
||||
.S123 {
|
||||
font-style: italic;
|
||||
color: #00007F;
|
||||
}
|
||||
|
||||
.S125 {
|
||||
font-style: italic;
|
||||
font-family: 'Comic Sans MS';
|
||||
color: #FF55FF;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.S127 {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.style38 {
|
||||
color: #A70094
|
||||
}
|
||||
|
||||
.style40 {
|
||||
font-size: 12px;
|
||||
color: #474E6F;
|
||||
}
|
||||
|
||||
.style41 {
|
||||
color: #474E6F
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p><span class="style36">Date/Time Converter Class
|
||||
Usage/Examples</span><br>
|
||||
<br>
|
||||
<br>
|
||||
Remember, you can convert <span class="style37"> almost any form
|
||||
of date/time</span>. It also <span class="style37">accepts date/times
|
||||
that don't have leading zeros</span> (such as n/j/y). It works fine as long as
|
||||
the numbers aren't bunched together like: 11908 (njy), (not even a human
|
||||
can read that), but 11 9 08 or 11/9/08 or 11/9 08 will work.</p>
|
||||
<table width="100%" border="0" cellpadding="10">
|
||||
<tr>
|
||||
<td width="13%" align="center" bgcolor="#003300"><span
|
||||
class="style14">Original Date </span></td>
|
||||
<td width="10%" align="center" bgcolor="#003300"><span
|
||||
class="style14">Original Mask</span></td>
|
||||
<td width="10%" align="center" bgcolor="#003300"><span
|
||||
class="style14">New Mask </span></td>
|
||||
<td width="14%" align="center" bgcolor="#003300"><span
|
||||
class="style14">Output</span></td>
|
||||
<td width="53%" align="left" bgcolor="#003300"><span
|
||||
class="style14">Syntax</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style30">11/1/2008
|
||||
17:40:00</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style32">n/j/Y
|
||||
H:i:s</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style40">m/d/y
|
||||
G:i </span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style34">11/01/08
|
||||
17:40</span></td>
|
||||
<td align="left" bgcolor="#E9E9E9"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> Date_Time_Converter</span><span class="S127">(</span><span
|
||||
class="S119">"11/1/2008 17:40:00"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"n/j/Y H:i:s"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S118">convert</span><span class="S127">(</span><span
|
||||
class="S119">"m/d/y G:i"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span class="S125">//you
|
||||
may echo the return value of convert() </span><br />
|
||||
</span> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style30">11/20/2005
|
||||
07:40:00 PM</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style32">m/d/Y
|
||||
h:i:s A</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style40">M
|
||||
jS, Y g:ia </span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style34">Nov
|
||||
20th, 2005 7:40pm</span></td>
|
||||
<td align="left" bgcolor="#DBDBDB"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"11/20/2005 07:40:00 PM"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"m/d/Y h:i:s A"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"M jS, Y g:ia"</span><span class="S127">,
|
||||
true);</span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S118">date_time</span><span class="S127">;</span><span
|
||||
class="S118"> </span><span class="S125">//or if
|
||||
you set the 2nd argument in convert() to true, you can retreive the
|
||||
value from the public $date_time variable </span> </span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#DBDBDB"><span
|
||||
class="style30">219</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style32">nj</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style33"><span
|
||||
class="style41">m/d</span></span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style34">02/19</span></td>
|
||||
<td align="left" bgcolor="#DBDBDB"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"219"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"nj"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span class="S125">//its
|
||||
smart... it knows there's no such month as 21, so it must be 2 </span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"m/d"</span><span class="S127">);</span><span
|
||||
class="S118"> </span> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#E9E9E9"><span
|
||||
class="style30">119</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style32">nj</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style33"><span
|
||||
class="style41">m-d</span></span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style34">11-09</span></td>
|
||||
<td align="left" bgcolor="#E9E9E9"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"119"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"nj"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span class="S125">//this
|
||||
defaults to November 9th, not January 19th. </span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"m-d"</span><span class="S127">);</span><span
|
||||
class="S118"> </span> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#DBDBDB"><span
|
||||
class="style30">11 20 2005 07:40:25 PM</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style32">m/d/Y
|
||||
h:i:s A</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB">
|
||||
<p class="style40">F jS 'y, g:i:sa</p>
|
||||
</td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style34">November
|
||||
20th '05, 7:40:25pm</span></td>
|
||||
<td align="left" bgcolor="#DBDBDB"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"11 20 2005 07:40:25 PM"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"m/d/Y h:i:s A"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S123"><span class="style38">echo </span>$obj</span><span
|
||||
class="S127">-><span class="S118">convert</span>(</span><span
|
||||
class="S119">"F jS 'y, g:i:sa"</span><span class="S127">);</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#E9E9E9" class="style30">Fri,
|
||||
Feb 9th, 2007</td>
|
||||
<td align="center" bgcolor="#E9E9E9" class="style32">D, M jS, Y</td>
|
||||
<td align="center" bgcolor="#E9E9E9" class="style33"><span
|
||||
class="style35"><span class="style41">Y-m-d</span></span></td>
|
||||
<td align="center" bgcolor="#E9E9E9" class="style34">2007-02-09</td>
|
||||
<td align="left" bgcolor="#E9E9E9" class="style35"><span
|
||||
class="style33"><span class="S123">$obj</span><span
|
||||
class="S118"> </span><span class="S127">=</span><span class="S118">
|
||||
</span><span class="S121">new</span><span class="S118"> </span><span
|
||||
class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"Fri, Feb 9th, 2007"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"D, M jS, Y"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S123"><span class="style38">echo </span>$obj</span><span
|
||||
class="S127">-></span><span class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"Y-m-d"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span
|
||||
class="S125">//you may also provide the day of the week in
|
||||
"D" format (Sun, Mon, Tue) </span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#DBDBDB" class="style30">11:20
|
||||
AM</td>
|
||||
<td align="center" bgcolor="#DBDBDB" class="style32">g:i A</td>
|
||||
<td align="center" bgcolor="#DBDBDB" class="style33"><span
|
||||
class="style41">g:i a</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB" class="style34">11:20 am</td>
|
||||
<td align="left" bgcolor="#DBDBDB" class="style35">
|
||||
<p><span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="style33"><span
|
||||
class="S118">Date_Time_Converter</span></span>(</span><span class="S119">"11:20
|
||||
AM"</span><span class="S127">,</span><span class="S118"> </span><span
|
||||
class="S119">"g:i A"</span><span class="S127">);</span>
|
||||
<span class="S125">//time only </span><br />
|
||||
<span class="S123"><span class="style33"><span
|
||||
class="style38">echo </span></span>$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="style33"><span class="S118">convert</span></span>(</span><span
|
||||
class="S119">"g:i a"</span><span class="S127">);</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Date and Time Converter - Examples, Usage, and Syntax</title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.style14 {
|
||||
color: #FFFFFF;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style30 {
|
||||
color: #006600;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style32 {
|
||||
color: #006699;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style33 {
|
||||
font-size: 12px
|
||||
}
|
||||
|
||||
.style34 {
|
||||
color: #990000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style35 {
|
||||
color: #000000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.style36 {
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.style37 {
|
||||
color: #CC0000;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.S18 {
|
||||
color: #0000FF;
|
||||
}
|
||||
|
||||
span {
|
||||
font-family: 'Verdana';
|
||||
font-size: 10pt;
|
||||
}
|
||||
|
||||
.S118 {
|
||||
color: #000033;
|
||||
}
|
||||
|
||||
.S119 {
|
||||
color: #004D00;
|
||||
}
|
||||
|
||||
.S121 {
|
||||
font-style: italic;
|
||||
color: #7F007F;
|
||||
}
|
||||
|
||||
.S122 {
|
||||
color: #FF822E;
|
||||
}
|
||||
|
||||
.S123 {
|
||||
font-style: italic;
|
||||
color: #00007F;
|
||||
}
|
||||
|
||||
.S125 {
|
||||
font-style: italic;
|
||||
font-family: 'Comic Sans MS';
|
||||
color: #FF55FF;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.S127 {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.style38 {
|
||||
color: #A70094
|
||||
}
|
||||
|
||||
.style40 {
|
||||
font-size: 12px;
|
||||
color: #474E6F;
|
||||
}
|
||||
|
||||
.style41 {
|
||||
color: #474E6F
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p><span class="style36">Date/Time Converter Class
|
||||
Usage/Examples</span><br>
|
||||
<br>
|
||||
<br>
|
||||
Remember, you can convert <span class="style37"> almost any form
|
||||
of date/time</span>. It also <span class="style37">accepts date/times
|
||||
that don't have leading zeros</span> (such as n/j/y). It works fine as long as
|
||||
the numbers aren't bunched together like: 11908 (njy), (not even a human
|
||||
can read that), but 11 9 08 or 11/9/08 or 11/9 08 will work.</p>
|
||||
<table width="100%" border="0" cellpadding="10">
|
||||
<tr>
|
||||
<td width="13%" align="center" bgcolor="#003300"><span
|
||||
class="style14">Original Date </span></td>
|
||||
<td width="10%" align="center" bgcolor="#003300"><span
|
||||
class="style14">Original Mask</span></td>
|
||||
<td width="10%" align="center" bgcolor="#003300"><span
|
||||
class="style14">New Mask </span></td>
|
||||
<td width="14%" align="center" bgcolor="#003300"><span
|
||||
class="style14">Output</span></td>
|
||||
<td width="53%" align="left" bgcolor="#003300"><span
|
||||
class="style14">Syntax</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style30">11/1/2008
|
||||
17:40:00</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style32">n/j/Y
|
||||
H:i:s</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style40">m/d/y
|
||||
G:i </span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style34">11/01/08
|
||||
17:40</span></td>
|
||||
<td align="left" bgcolor="#E9E9E9"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> Date_Time_Converter</span><span class="S127">(</span><span
|
||||
class="S119">"11/1/2008 17:40:00"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"n/j/Y H:i:s"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S118">convert</span><span class="S127">(</span><span
|
||||
class="S119">"m/d/y G:i"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span class="S125">//you
|
||||
may echo the return value of convert() </span><br />
|
||||
</span> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style30">11/20/2005
|
||||
07:40:00 PM</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style32">m/d/Y
|
||||
h:i:s A</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style40">M
|
||||
jS, Y g:ia </span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style34">Nov
|
||||
20th, 2005 7:40pm</span></td>
|
||||
<td align="left" bgcolor="#DBDBDB"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"11/20/2005 07:40:00 PM"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"m/d/Y h:i:s A"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"M jS, Y g:ia"</span><span class="S127">,
|
||||
true);</span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S118">date_time</span><span class="S127">;</span><span
|
||||
class="S118"> </span><span class="S125">//or if
|
||||
you set the 2nd argument in convert() to true, you can retreive the
|
||||
value from the public $date_time variable </span> </span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#DBDBDB"><span
|
||||
class="style30">219</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style32">nj</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style33"><span
|
||||
class="style41">m/d</span></span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style34">02/19</span></td>
|
||||
<td align="left" bgcolor="#DBDBDB"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"219"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"nj"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span class="S125">//its
|
||||
smart... it knows there's no such month as 21, so it must be 2 </span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"m/d"</span><span class="S127">);</span><span
|
||||
class="S118"> </span> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#E9E9E9"><span
|
||||
class="style30">119</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style32">nj</span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style33"><span
|
||||
class="style41">m-d</span></span></td>
|
||||
<td align="center" bgcolor="#E9E9E9"><span class="style34">11-09</span></td>
|
||||
<td align="left" bgcolor="#E9E9E9"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"119"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"nj"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span class="S125">//this
|
||||
defaults to November 9th, not January 19th. </span><br />
|
||||
<span class="S121">echo</span><span class="S118"> </span><span
|
||||
class="S123">$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"m-d"</span><span class="S127">);</span><span
|
||||
class="S118"> </span> </span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#DBDBDB"><span
|
||||
class="style30">11 20 2005 07:40:25 PM</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style32">m/d/Y
|
||||
h:i:s A</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB">
|
||||
<p class="style40">F jS 'y, g:i:sa</p>
|
||||
</td>
|
||||
<td align="center" bgcolor="#DBDBDB"><span class="style34">November
|
||||
20th '05, 7:40:25pm</span></td>
|
||||
<td align="left" bgcolor="#DBDBDB"><span class="style33">
|
||||
|
||||
<span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"11 20 2005 07:40:25 PM"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"m/d/Y h:i:s A"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S123"><span class="style38">echo </span>$obj</span><span
|
||||
class="S127">-><span class="S118">convert</span>(</span><span
|
||||
class="S119">"F jS 'y, g:i:sa"</span><span class="S127">);</span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#E9E9E9" class="style30">Fri,
|
||||
Feb 9th, 2007</td>
|
||||
<td align="center" bgcolor="#E9E9E9" class="style32">D, M jS, Y</td>
|
||||
<td align="center" bgcolor="#E9E9E9" class="style33"><span
|
||||
class="style35"><span class="style41">Y-m-d</span></span></td>
|
||||
<td align="center" bgcolor="#E9E9E9" class="style34">2007-02-09</td>
|
||||
<td align="left" bgcolor="#E9E9E9" class="style35"><span
|
||||
class="style33"><span class="S123">$obj</span><span
|
||||
class="S118"> </span><span class="S127">=</span><span class="S118">
|
||||
</span><span class="S121">new</span><span class="S118"> </span><span
|
||||
class="S127"><span class="S118">Date_Time_Converter</span>(</span><span
|
||||
class="S119">"Fri, Feb 9th, 2007"</span><span class="S127">,</span><span
|
||||
class="S118"> </span><span class="S119">"D, M jS, Y"</span><span
|
||||
class="S127">);</span><br />
|
||||
<span class="S123"><span class="style38">echo </span>$obj</span><span
|
||||
class="S127">-></span><span class="S127"><span class="S118">convert</span>(</span><span
|
||||
class="S119">"Y-m-d"</span><span class="S127">);</span><span
|
||||
class="S118"> </span><span
|
||||
class="S125">//you may also provide the day of the week in
|
||||
"D" format (Sun, Mon, Tue) </span></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height="25" align="center" bgcolor="#DBDBDB" class="style30">11:20
|
||||
AM</td>
|
||||
<td align="center" bgcolor="#DBDBDB" class="style32">g:i A</td>
|
||||
<td align="center" bgcolor="#DBDBDB" class="style33"><span
|
||||
class="style41">g:i a</span></td>
|
||||
<td align="center" bgcolor="#DBDBDB" class="style34">11:20 am</td>
|
||||
<td align="left" bgcolor="#DBDBDB" class="style35">
|
||||
<p><span class="S123">$obj</span><span class="S118"> </span><span
|
||||
class="S127">=</span><span class="S118"> </span><span class="S121">new</span><span
|
||||
class="S118"> </span><span class="S127"><span class="style33"><span
|
||||
class="S118">Date_Time_Converter</span></span>(</span><span class="S119">"11:20
|
||||
AM"</span><span class="S127">,</span><span class="S118"> </span><span
|
||||
class="S119">"g:i A"</span><span class="S127">);</span>
|
||||
<span class="S125">//time only </span><br />
|
||||
<span class="S123"><span class="style33"><span
|
||||
class="style38">echo </span></span>$obj</span><span class="S127">-></span><span
|
||||
class="S127"><span class="style33"><span class="S118">convert</span></span>(</span><span
|
||||
class="S119">"g:i a"</span><span class="S127">);</span></p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user