Julian date

30 Apr 2015 07:42
Tags

Back to list of posts

  • I did not create this profile, I found it on the net after quite a bit of searching.

To get the current Julian date:

1. Create your task by adding a JavaScriplet
Code -> Javascriptlet

In the code section:
Date.prototype.getDOY = function() {
var onejan=new
Date(this.getFullYear(),0,1);
return Math.ceil((this-onejan)/86400000);
}
var today = new Date();
var daynum = today.getDOY();

I know Math.ceil looks weird, but it works

2. Say
Today's Julian date is %daynum.

3. Pop-up
Text: Today's Julian date is %daynum.

4. Profile status
Julian date set off (I turn off the profile since I only need to know once a day at work).

Comments: 0

Add a New Comment

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License