Skip to content

Instantly share code, notes, and snippets.

@colek42
Created March 2, 2016 11:00
Show Gist options
  • Save colek42/bc4d1a09807dabf07418 to your computer and use it in GitHub Desktop.
Save colek42/bc4d1a09807dabf07418 to your computer and use it in GitHub Desktop.
//Paste this into http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html replacing exisiting code
var date = new Cesium.JulianDate.now();
var outObj = []
for(var i = 0; i < 100; i++){
var rand = Math.floor((Math.random() * 10000000) + 1);
var newDate = new Cesium.JulianDate();
Cesium.JulianDate.addMinutes(date, rand, newDate);
outObj.push({
ISO: Cesium.JulianDate.toIso8601(newDate),
JulianDayNumber: newDate.dayNumber,
JulianSecondsofDay: newDate.secondsOfDay
})
}
console.log(JSON.stringify(outObj, null, 2));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment