I’m curious about this DateTime library.

Here are the functions so far. (that i know of)

DateTime.now(DateTimeKind kind)

Creates a DateTime with Kind of the specified type or UTC type. Time appears to be what you will get with os.time()

DateTime.new(number years,number months,number days,number hours,number minutes,number seconds,DateTimeKind kind)

Creates a DateTime with Kind of specified type or UTC type. The time created is based on the six numbers passed through, or 0. Time appears to be created in a method similar to what os.time does.

DateTime.fromUnixTimestamp(number seconds,DateTimeKind kind)

Creates a DateTime with kind of specified type or UTC type. The time appears to be the first argument (seconds) or 0. Time appears to be limited in range from 0 to 32535215999 (truncated to an integer), not sure if this is true for the other functions.

DateTime.fromIsoDate(string DateTime)

If no arguments are passed, returns nil, same thing with numbers. With strings it will try to convert it to a number from ISO format (found example “2012-12-19T06:01:17.171Z”). But with anything else, roblox crashes.

Is it intended to crash, or should I make a bug report about this?

Also, what is the point of the DateTimeKind or even this datatype itself?

DateTimeKind appears to just be a part of the DateTime data type, and doesn’t affect how the time is set in the constructors.

Also, are there any properties/functions for this DateType?

I figured out one

.Kind

Describes the DateTimeKind of the DateTime.

Is there one for the time represented by the DateTime, or do I have to extract the number with some string manipulation?