Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds IsZero functionality to DateTime #105

Merged
merged 2 commits into from
Mar 16, 2023

Commits on Mar 14, 2023

  1. Adds IsZero functionality to DateTime

    This PR adds a new function `IsZero` to the DateTime struct. The goal of
    this is to satisfy a common interface, IsZeroer, used by go-yaml/yaml
    marshaller. `IsZero` already exists on the time.Time object, so this
    does not introduce any novel implementation.
    
    For reference, here is the [documentation
    note](https://pkg.go.dev/gopkg.in/yaml.v3#Marshal) on using IsZero by the
    `(yaml).Marshal` function.
    
    Signed-off-by: Brandon Gonzalez <bg@chronosphere.io>
    bg451 committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    3595643 View commit details
    Browse the repository at this point in the history
  2. add UnixZero

    Signed-off-by: Brandon Gonzalez <bg@chronosphere.io>
    bg451 committed Mar 14, 2023
    Configuration menu
    Copy the full SHA
    397e96b View commit details
    Browse the repository at this point in the history