static/jsvm/interfaces/types.DateTime.html
DateTime represents a [time.Time] instance in UTC that is wrapped and serialized using the app default date layout.
addaddDateafterbeforecompareequalisZeromarshalJSONscanstringsubtimeunixunmarshalJSONvalue
Add returns a new DateTime based on the current DateTime + the specified duration.
AddDate returns a new DateTime based on the current one + duration.
It follows the same rules as [time.AddDate].
After reports whether the current DateTime instance is after u.
Before reports whether the current DateTime instance is before u.
Compare compares the current DateTime instance with u. If the current instance is before u, it returns -1. If the current instance is after u, it returns +1. If they're the same, it returns 0.
Equal reports whether the current DateTime and u represent the same time instant. Two DateTime can be equal even if they are in different locations. For example, 6:00 +0200 and 4:00 UTC are Equal.
IsZero checks whether the current DateTime instance has zero time value.
MarshalJSON implements the [json.Marshaler] interface.
Scan implements [sql.Scanner] interface to scan the provided value into the current DateTime instance.
String serializes the current DateTime instance into a formatted UTC date string.
The zero value is serialized to an empty string.
Sub returns a [time.Duration] by subtracting the specified DateTime from the current one.
If the result exceeds the maximum (or minimum) value that can be stored in a [time.Duration], the maximum (or minimum) duration will be returned.
Time returns the internal [time.Time] instance.
Unix returns the current DateTime as a Unix time, aka. the number of seconds elapsed since January 1, 1970 UTC.
UnmarshalJSON implements the [json.Unmarshaler] interface.
Value implements the [driver.Valuer] interface.
OSLightDark
Generated using TypeDoc