![]() |
|
TCDate ExamplesThe local date and time: Friday, September 10th, 2010 at 8:02:46 PM PDT The UTC date and time: Saturday, September 11th, 2010 at 3:02:46 AM GMT The TCDate (local): TC27:82 The TCDate (UTC): TC27:82 Formatted ExamplesThe TCDate (local): Aleph 1, Large Scale 1, in the cycle 7, Thoth Count27:82 Friday 8:02:46 PM PDT Count Method: Long Count The TCDate (UTC): Aleph 1, Large Scale 1, in the cycle 7, Thoth Count27:82 Saturday 3:02:46 AM GMT Count Method: Long Count DownloadYou can download the files (including this example) here: TCDate version 1.0 Documentationfunction tc_date([string format[,int timestamp[, string counting method]]]) The parameters can be omitted, right to left and will be replaced as explained below. Returns a formatted TC Date string @param format the String format: ----- Epochs and Large scale time ----- X : Aleph Example: 1 (Negative numbers represent dates before Aleph 1, Year 1, Day 1) L : Large Scale Count (there are 1000 in an Aleph) Example: 3 C : Cycle (there are either 4 or 9 in a Large Scale) Example: 2 ----- Dates ---------------------- Y : Year (there are 4 in a cycle) Example: 15 y : Year [same as Y - added for convenience] d : Day with leading 0 (there are 88 in a year) 01 to 88 j : Day with no leading 0 Example : 1 to 88 D : A textual representation of a day, three letters Mon through Sun l (lowercase 'L') : A full textual representation of the day of the week ----- Time ------------------------ a : Lowercase Ante meridiem and Post meridiem am or pm A : Uppercase Ante meridiem and Post meridiem AM or PM g : 12-hour format of an hour without leading zeros 1 through 12 G : 24-hour format of an hour without leading zeros 0 through 23 h : 12-hour format of an hour with leading zeros 01 through 12 H : 24-hour format of an hour with leading zeros 00 through 23 i : Minutes with leading zeros 00 to 59 s : Seconds, with leading zeros 00 through 59 ----- Timezone --- e Timezone identifier (added in PHP 5.1.0) Examples: UTC, GMT, Atlantic/Azores I (capital i) Whether or not the date is in daylight saving time 1 if Daylight Saving Time, 0 otherwise. O Difference to Greenwich time (GMT) in hours Example: +0200 P Difference to Greenwich time (GMT) with colon between hours and minutes (added in PHP 5.1.3) Example: +02:00 z Timezone abbreviation Examples: EST, MDT ... Z Timezone offset in seconds. The offset for timezones west of UTC is always negative, and for those east of UTC is always positive. ----- Extra ----------------- t : Short Identifier as a TC Date Example: TC T : Long Identifier as a TC Date Example: Thoth Count c : TC Count method Example: Long Count @param arg a unix timestamp, if omitted defaults to the current time @param method the String name of the TC Method, 'short' or 'long' @return a formatted TC Date String Example usage: print "Now : ".tc_date()."<br>--------- Ouput: Now : TC16:07 Fully formatted: Aleph 1, Large Scale 1, in the cycle 4, Thoth Count16:07 Saturday 9:42:04 PM Count Method: Long Count |
|