Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve #inspect format for Time types (#5794)
* Improve #inspect format for Time::Location types * Add Time::Zone#format and use it in Time::Formatter * Improve format of Time#inspect `#inspect` now prints `nanoseconds` unless it is `0` and uses `Time::Zone#format`. Location name is no longer omitted if `"Local"`, otherwise there would be no distinction between a fixed offset time zone and local time zone because both would just show the offset and no name. `#to_s` still omits nanoseconds and time zone name.
- Loading branch information
1 parent
fdda990
commit 3afc781
Showing
5 changed files
with
198 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.