Socket
Socket
Sign inDemoInstall

github.com/rickb777/date

Package Overview
Dependencies
7
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/rickb777/date

Package date provides functionality for working with dates. It implements a light-weight Date type that is storage-efficient and convenient for calendrical calculations and date parsing and formatting (including years outside the [0,9999] interval). Subpackages provide: * `clock.Clock` which expresses a wall-clock style hours-minutes-seconds with millisecond precision. * `period.Period` which expresses a period corresponding to the ISO-8601 form (e.g. "PT30S"). * `timespan.DateRange` which expresses a period between two dates. * `timespan.TimeSpan` which expresses a duration of time between two instants. * `view.VDate` which wraps `Date` for use in templates etc. This package follows very closely the design of package time (http://golang.org/pkg/time/) in the standard library, many of the Date methods are implemented using the corresponding methods of the time.Time type, and much of the documentation is copied directly from that package. https://golang.org/src/time/time.go https://en.wikipedia.org/wiki/Gregorian_calendar https://en.wikipedia.org/wiki/Proleptic_Gregorian_calendar https://en.wikipedia.org/wiki/Astronomical_year_numbering https://en.wikipedia.org/wiki/ISO_8601 https://tools.ietf.org/html/rfc822 https://tools.ietf.org/html/rfc850 https://tools.ietf.org/html/rfc1123 https://tools.ietf.org/html/rfc3339


Version published

Readme

Source

date

GoDoc Build Status Coverage Status Go Report Card Issues

Package date provides functionality for working with dates.

This package introduces a light-weight Date type that is storage-efficient and convenient for calendrical calculations and date parsing and formatting (including years outside the [0,9999] interval).

It also provides

  • clock.Clock which expresses a wall-clock style hours-minutes-seconds with millisecond precision.
  • period.Period which expresses a period corresponding to the ISO-8601 form (e.g. "PT30S").
  • timespan.DateRange which expresses a period between two dates.
  • timespan.TimeSpan which expresses a duration of time between two instants.
  • view.VDate which wraps Date for use in templates etc.

See package documentation for full documentation and examples.

Installation

go get -u github.com/rickb777/date

or

dep ensure -add github.com/rickb777/date

Status

This library has been in reliable production use for some time. Versioning follows the well-known semantic version pattern.

Credits

This package follows very closely the design of package time in the standard library; many of the Date methods are implemented using the corresponding methods of the time.Time type and much of the documentation is copied directly from that package.

The original Good Work on which this was based was done by Filippo Tampieri at Fxtlabs.

FAQs

Last updated on 22 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc