Skip to content

Instantly share code, notes, and snippets.

@botic
Created May 17, 2016 21:12
Show Gist options
  • Select an option

  • Save botic/2d980f5d33069d2ea0dc6372ad60d942 to your computer and use it in GitHub Desktop.

Select an option

Save botic/2d980f5d33069d2ea0dc6372ad60d942 to your computer and use it in GitHub Desktop.
JF Calculator
const dates = require("ringo/utils/dates");
const dayToFind = "Mon";
for (let i = 5; i < 12; i++) {
let dom = new Date(2016, i, 1);
while(dates.format(dom, "EEE", java.util.Locale.US) !== dayToFind) {
dom = dates.add(dom, 1, "day");
}
print(dates.format(dom, "dd. MMMM YYYY' 19:00'", java.util.Locale.GERMAN));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment