Functions for Time

"It's still web development, it's just way easier!"

Date & Time

The functions that return a date value are based on seconds since 1970. By using the following functions time differences can be calculated and returned as time amounts or actual date times. Also, there are many built-in time conversions for converting one unit of time to another.

  • <#seven = 7>
  • <#time> (1508361090) is a system variable that's returns the local time in seconds since 1970 (an epoch).
  • <#today = datelong> (10/18/2017)
  • <#tomorrow = "<#<#datelong:toepoch> + 1(day):datelong>"> (10/19/2017)
Type Description Example Result
date The date format of the epoch used. <#time:date> October 18, 2017
date2 The date2 format of the epoch used. <#time:date2> 10/18/17
datelong The datelong format of the epoch used. <#time:datelong> 10/18/2017
day The day of the epoch used. <#time:day> 18
day2 The day2 format of the epoch used. <#time:day2> 18
hour The hour of the epoch used. <#time:hour> 9
hour2 The hour2 format of the epoch used. <#time:hour2> 09
hour24 The hour24 format of the epoch used. <#time:hour24> 21
hour24min The hour24min format of the epoch used. <#time:hour24min> 21:11
hourmin The hourmin format of the epoch used. <#time:hourmin> 9:11
leapyear Returns "1" if it's a leap year, "0" if not, of the epoch used. <#time:leapyear> 0
meridian The meridian of the epoch used. <#time:meridian> pm
minutes The minutes of the epoch used. <#time:minutes> 11
month The month of the epoch used. <#time:month> October
month2 The month2 format of the epoch used. <#time:month2> 10
monthabbr The monthabbr format of the epoch used. <#time:monthabbr> Oct
monthdays The amount of days in the month of the epoch used. <#time:monthdays> 31
seconds The seconds of the epoch used. <#time:seconds> 30
timefull The timefull format of the epoch used. <#time:timefull> 10/18/2017 09:11:30 pm
timefull24 The timefull24 format of the epoch used. <#time:timefull24> 10/18/2017 21:11:30
timesort The timesort format of the epoch used. <#time:timesort> 2017/10/18 09:11:30 pm
timeiso The ISO 8601 format of the epoch used (assumes the given time is in GMT). <#gmttime:timeiso> 2017-10-19T05:11:30Z
ToDayAbbr The abreviated weekday name of a number (1-7). <#seven:todayabbr> Sun
ToDayName The weekday name of a number (1-7). <#seven:todayname> Sunday
ToEpoch Converts a standard date format to the seconds since 1970. <#datelong:toepoch> 1508284800
ToMonthAbbr The abbreviated month name of a number (1-12). <#seven:tomonthabbr> Jul
ToMonthName The month name of a number (1-12). <#seven:tomonthname> July
utc A time format for cookie expire (Wdy, DD-Mon-YYYY HH:MM:SS GMT). <#gmttime:utc> Thu, 19-Oct-2017 05:11:30 GMT
week The week of the epoch used. <#time:week> 42
weekday The weekday of the epoch used. <#time:weekday> Wednesday
weekdayabbr The weekdayabbr format of the epoch used. <#time:weekdayabbr> Wed
weekdayindex The weekday number of the weekday (1-7, Mon.=1). <#time:weekdayindex> 3
wweek The week of the epoch used in "W" format. <#time:wweek> W42
year The year of the epoch used. <#time:year> 2017
year2 The year2 format of the epoch used. <#time:year2> 17
yearday The year day of the epoch used. <#time:yearday> 291