Home Reference Source

Getting started


Install joda using npm

npm install @js-joda/core

Then require it to any module

var LocalDate = require("@js-joda/core").LocalDate;

var d = LocalDate.parse("2012-12-24")
  .plusMonths(2); // 2013-02-24T00:00:00


To use js-joda from a browser, download either dist/js-joda.min.js or dist/js-joda.js (with sourcemaps for development)

Then add it as a script tag to your page

<script src="js-joda.min.js"></script>
    var LocalDate = JSJoda.LocalDate;
    var d = LocalDate.parse('2012-12-24').atStartOfDay().plusMonths(2); // 2013-02-24T00:00:00


Fiddle around with jsjoda, find a simple example setup at https://jsfiddle.net/shto0ze6/