Home Reference Source

Getting started

Node

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")
  .atStartOfDay()
  .plusMonths(2); // 2013-02-24T00:00:00

Browser

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>
<script>
    var LocalDate = JSJoda.LocalDate;
    var d = LocalDate.parse('2012-12-24').atStartOfDay().plusMonths(2); // 2013-02-24T00:00:00
</script>

JSFiddle

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