Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* time: add time module Signed-off-by: b5 <[email protected]> * time: adjust package API move parsing functions: time.time -> time.parse_time time.duration -> time.parse_duration make `time.time` a constructor function that wraps golang's `time.Date` make `time.duration` a constructor funciton that accepts a single param of type int, string, or duration rename time.fromtimestamp -> time.from_timestamp make time.time unit accessors fields instead of methods: t.year() -> t.year t.month() -> t.month t.day() -> t.day t.hour() -> t.hour t.minute() -> t.minute t.second() -> t.second t.nanosecond() -> t.nanosecond t.unix() -> t.unix t.unix_nano() -> t.unix_nano make time.duration unit accessors fields instead of methods: d.hours() -> d.hours d.minutes() -> d.minutes d.seconds() -> d.seconds d.nanoseconds() -> d.nanoseconds * perf(time): don't allocate int on time & duration Hash methods * time: apply remarks * time: Use int64 instead of int as type of argument * time: Remove the file doc.go as it is not compliant with the current doc convention * time: Applied remarks * time: Applied remarks * time: Set the correct name of the functions Co-authored-by: essobedo <[email protected]>
- Loading branch information