A language built for fun
This project is maintained by cometlang
inherits Object
init([year],[month],[day],[hour],[minute],[seconds],[milliseconds])
Create a datetime in the current timezone from the given values.to_string()
outputs a string representation of the datetime in a json-compliant ISO8601 format. yyyy-mm-ddTHH:MM:ss.mmmZyear()
get the year portion of the datetimemonth()
get the month portion of the datetimeday()
get the day portion of the datetimehours()
get the hours portion of the datetimeminutes()
get the minutes portion of the datetimeseconds()
get the seconds portion of the datetimemilliseconds()
get the milliseconds portion of the datetimenow()
returns a DateTime representing the current local timeparse('to_parse', ['format'])
parse a String into a DateTime. See here for format string specifiers. format
defaults to ā%Y-%m-%dT%H:%M:%6S%zā which will parse the output of DateTime::to_string()
-
subtracts either a datetime or a duration to the existing datetime. The returned type is the same as the operand.==
compares two datetimes and returns true if they both represent the same point in time