![]() |
Time#subsec() is a Time class method which returns the fraction for time as a rational number.
Example #1 :
Output : Time a : 2019-01-01 00:00:00 +0000 Time b : 2019-10-01 00:00:00 +0000 Time c : 2019-12-31 00:00:00 +0000 Time a subsec form : 0 Time b subsec form : 0 Time c subsec form : 0 Example #2 :
Output : Time a : 2019-08-27 12:08:40 +0000 Time b : 1000-10-10 00:00:00 +0000 Time c : 2020-12-01 00:00:00 +0000 Time a subsec form : 16172931/1000000000 Time b subsec form : 0 Time c subsec form : 0 |
Reffered: https://www.geeksforgeeks.org
Ruby |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 10 |