Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DateOptions ¶
type DateOptions struct {
Format string // custom format string
UTC bool // -u: use UTC time
ISO bool // --iso-8601: output date/time in ISO 8601 format
JSON bool // --json: output as JSON
}
DateOptions configures the date command behavior
type DateResult ¶
type DateResult struct {
Formatted string `json:"formatted"`
Unix int64 `json:"unix"`
UnixNano int64 `json:"unix_nano"`
Year int `json:"year"`
Month int `json:"month"`
Day int `json:"day"`
Hour int `json:"hour"`
Minute int `json:"minute"`
Second int `json:"second"`
Weekday string `json:"weekday"`
Timezone string `json:"timezone"`
UTC bool `json:"utc"`
}
DateResult represents date output for JSON
Click to show internal directories.
Click to hide internal directories.