Giter Club home page Giter Club logo

bikram-sambat-anno-domini-fixtures's Introduction

Medium Logo Twitter Logo LinkedIn Logo

bikram-sambat-anno-domini-fixtures's People

Stargazers

 avatar

Watchers

 avatar  avatar

bikram-sambat-anno-domini-fixtures's Issues

EN dates in the minified export not monotonically increasing

If I understand correctly, both EN and NP dates for each array index i should be strictly less than array index i+1 i.e. it should monotonically increase into the future.

I might have a case where this does not hold true. Check indices 9132 and 9132 + 264 = 9394.
It's cumbersome to deal with the large JSON in the browser so I curl'd the minified export from commit 67989f2.

 curl https://raw.githubusercontent.com/mesaugat/bikram-sambat-anno-domini-fixtures/67989f277816566067a53ac446e558ed94cc489c/export-minified.json > ref_67989f277816566067a53ac446e558ed94cc489c.json

I wrote this small JS script:

const fs = require('fs')

const file = fs.readFileSync("ref_67989f277816566067a53ac446e558ed94cc489c.min.json")
const refs = JSON.parse(file)

const base = 9132 
console.log('Index: ', base, '->', refs[base])

const index = 262
console.log('Index: ', base + index, '->', refs[base + index])

The base and index values are computed from the diff-ing I'm doing over at the nepcal repository.

Summarized results from that script are as follows (in yy-mm-dd syntax):

index en date np date
9132 1943 -4-4 2000-1-1
9394 1943 -1-1 2000-9-17

Here, the NP date moves forward in time, but the EN date moves backward.

Raw stdout output:

Index:  9132 -> {
  npYear: 2000,
  npMonth: 1,
  npDay: 1,
  enYear: 1943,
  enMonth: 4,
  enDay: 14
}

Index:  9394 -> {
  npYear: 2000,
  npMonth: 9,
  npDay: 17,
  enYear: 1943,
  enMonth: 1,
  enDay: 1
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.