]> Cypherpunks.ru repositories - gotai64n.git/blobdiff - db.go
Leapsecs and TAI64 support
[gotai64n.git] / db.go
diff --git a/db.go b/db.go
new file mode 100644 (file)
index 0000000..a9a9e35
--- /dev/null
+++ b/db.go
@@ -0,0 +1,52 @@
+/*
+go.cypherpunks.ru/tai64n -- Pure Go TAI64/TAI64N implementation
+Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, version 3 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package tai64n
+
+import "time"
+
+func init() {
+       LeapsecsDB = []int64{
+               time.Date(2017, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(2015, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(2012, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(2009, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(2006, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1999, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1997, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1996, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1994, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1993, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1992, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1991, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1990, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1988, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1985, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1983, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1982, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1981, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1980, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1979, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1978, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1977, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1976, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1975, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1974, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1973, 1, 1, 0, 0, 0, 0, time.UTC).Unix(),
+               time.Date(1972, 7, 1, 0, 0, 0, 0, time.UTC).Unix(),
+       }
+}