Overview
Using Leaf Dates
Just like all of Leaf's other functionality, the dates module will also have to be imported
CustomDate Function
Basically, CustomDate just gives you methods to manipulate the date and time, faster thatDateTime()
would allow. Let's take a look at these methods.
Timestamp
Timestamp as the name implies, generates a new random timestamp.
GetDateFromTimeStamp
This method gets the date in YYYY-MM-DD format from an existing timestamp
GetMonthFromNumber
This gets the month in words from a number (0-11)
GetDayFromNumber
This gets the day in words from a number (1-7)
GetEnglishDateFromTimeStamp
This gets the date in the format (MM DD, YYYY) from an existing timestamp
GetEnglishTimeStampFromTimeStamp
This gets the date in the format (DD MM, YYYY HH:MM:SS) from a timestamp
GetTimeFromTimeStamp
This gets the time in the format (HH:MM:SS) from a timestamp
Next Steps
Re-routing to index.phpSimple Routing
Request
Response