@sepbit/dekajs

8.0.0 • Public • Published

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.

Package Sidebar

Install

npm i @sepbit/dekajs

Weekly Downloads

0

Version

8.0.0

License

GPL-3.0-or-later

Unpacked Size

52.4 kB

Total Files

12

Last publish

Collaborators

  • vitoranguia