![]() ![]() Output: To convert the DateTime to other representations, use the DateTime#toRelative, DateTime#toRelativeCalendar, DateTime#toJSON, DateTime#toISO, DateTime#toHTTP, DateTime#toObject, DateTime#toRFC2822, DateTime#toString, DateTime#toLocaleString, DateTime#toFormat, DateTime#toMillis and DateTime#toJSDate.Transformation: To transform the DateTime into other DateTimes, use DateTime#set, DateTime#reconfigure, DateTime#setZone, DateTime#setLocale, us, DateTime#minus, DateTime#endOf, DateTime#startOf, DateTime#toUTC, and DateTime#toLocal.Configuration See the DateTime#locale and DateTime#numberingSystem accessors.Week calendar: For ISO week calendar attributes, see the DateTime#weekYear, DateTime#weekNumber, and DateTime#weekday accessors.Gregorian calendar and time: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through DateTime#toObject), use the DateTime#year, DateTime#month,ĭateTime#day, DateTime#hour, DateTime#minute, DateTime#second, DateTime#millisecond accessors.To create one from a native JS date, use omJSDate. To create one from a custom string format, use omFormat. To create one from a standard string format, use omISO, omHTTP, and omRFC2822. Creation: To create a DateTime from its components, use one of its factory class methods: DateTime.local, DateTime.utc, and (most flexibly) omObject.Here is a brief overview of the most commonly used functionality it provides: Configuration properties that effect how output strings are formatted, such as locale, numberingSystem, and outputCalendar. ![]() Each instance is considered in the context of a specific zone (by default the local system's zone). Each DateTime instance refers to a specific millisecond of the Unix epoch. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them. A DateTime is an immutable data structure representing a specific date and time and accompanying methods.
0 Comments
Leave a Reply. |