Method: DateTime#strftime
- Defined in:
- 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:
8721 8722 8723 8724 8725 8726 |
# File 'date_core.c', line 8721 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); } |