aodin / date Goto Github PK
View Code? Open in Web Editor NEWGolang's missing date package, including ranges
License: MIT License
Golang's missing date package, including ranges
License: MIT License
Times and dates that are zero (such as 0001-01-01 00:00:00 +0000 UTC
) will be marshaled to (and unmarshaled from) the JSON null
.
This is currently a wontfix
unless another proposal is made for the handling of null
dates - which are needed for unbounded ranges.
Ranges have two "zero" states
Infinity is marshaled to JSON as:
{
"start": null,
"end": null
}
Empty is marshaled to JSON as:
null
Unmarshal from these JSON examples should produce the respective ranges. It currently does not for unmarshaling a null
. A test case already exists: https://github.com/aodin/date/blob/master/range_test.go#L92-L96
Removing testify from the test suite would make date
dependent on only standard library packages.
Hello,
IsoDates are not parsing:
2017-11-17
> work
2017-11-17 13:26:32.178
> not work and return "0001-01-01"
2017-11-17T13:26:32.178Z
> not work and return "0001-01-01"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.