@sepbit/dekajs

This is a simple library to convert Dekatrian and Gregorian.

Usage no npm install needed!

<script type="module">
  import sepbitDekajs from 'https://cdn.skypack.dev/@sepbit/dekajs';
</script>

README

Dekajs

DEKAtrian for JavaScript

This is a simple library for converting dates between Dekatrian and Gregorian calendars. This library is not official.

This package is compatible with StandardJS and LibreJS.

Install

This project uses Node.js and npm.

$ npm install @sepbit/dekajs

Usage

CommonJS module.

const dekatrian = require('@sepbit/dekajs')

// Convert from Dekatrian to Gregorian calendars
dekatrian.dekaToGreg(2018, 13, 28)
// Return string, 2018-12-31

// Convert from Gregorian to Dekatrian calendars
dekatrian.gregToDeka(2018, 12, 31)
// Return string, 2018-13-28

ECMAScript module.

<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Title</title>
  </head>
  <body>
    <script type="module">
      import { dekaToGreg, gregToDeka } from 'https://unpkg.com/@sepbit/dekajs/src/main.js'

      // Convert from Dekatrian to Gregorian calendars
      dekaToGreg(2018, 13, 28)
      // Return string, 2018-12-31

      // Convert from Gregorian to Dekatrian calendars
      gregToDeka(2018, 12, 31)
      // Return string, 2018-13-28
    </script>
  </body>
</html>

Contributing

Pull Requests not accepted.

Security

If you discover any security related issues, please email contato@sepbit.com instead of using the issue tracker.

License

GPL-3.0-or-later, please see COPYING file for more information.