Method: DateTime#strftime
- Defined in:
- ext/date/date_core.c
#strftime(format = '%FT%T%:z') ⇒ String
Returns a string representation of self, formatted according the given +format:
DateTime.now.strftime # => "2022-07-01T11:03:19-05:00"
For other formats, see Formats for Dates and Times:
8723 8724 8725 8726 8727 8728 |
# File 'ext/date/date_core.c', line 8723 static VALUE dt_lite_strftime(int argc, VALUE *argv, VALUE self) { return date_strftime_internal(argc, argv, self, "%Y-%m-%dT%H:%M:%S%:z", set_tmx); } |