class
UIng::TM
- UIng::TM
- Reference
- Object
Defined in:
uing/tm.crConstructors
-
.new(time : Time)
Copies the calendar and clock fields from time.
- .new
Macro Summary
Instance Method Summary
-
#capture_native_zone : Nil
Copy a zone written by native code before its pointer can become stale.
-
#to_s(io : IO, format : String) : Nil
Delegate to_s to Time for convenient formatting
- #to_s(format : String) : String
-
#to_s(io : IO) : Nil
Appends a short String representation of this object which includes its class name and its object address.
-
#to_time : Time
Converts the calendar and clock fields to a value in
Time::Location.local. - #to_time? : Time | Nil
- #to_unsafe
- #zone : String | Nil
- #zone=(value : String)
Constructor Detail
Copies the calendar and clock fields from time. This does not convert the value to the process-local time zone.
Macro Detail
Instance Method Detail
Copy a zone written by native code before its pointer can become stale. Windows' struct tm has no zone field.
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Converts the calendar and clock fields to a value in
Time::Location.local. Stored offset and zone fields are not used.
Invalid date/time fields raise ArgumentError.