-
Notifications
You must be signed in to change notification settings - Fork 1
/
milesianclockinitiate.js.html
136 lines (110 loc) · 6.13 KB
/
milesianclockinitiate.js.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Source: milesianclockinitiate.js</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Source: milesianclockinitiate.js</h1>
<section>
<article>
<pre class="prettyprint source linenums"><code>/**
* @file Milesian Clock and converter functions - launcher part.
* This routine loads the modules necessary for html applications.
* @requires module:fetchdom
* @requires module:pldr
* @requires module:time-units
* @requires module:extdate
* @requires module:extdatetimeformat
* @requires module:calendars
* @requires module:deltat
* @requires module:seasons
* @requires module:calendarclock
* @requires module:countconversion
* @requires module:lunar
* @requires module:yearsignature
* @version M2022-10-26
* @author Louis A. de Fouquières https://github.com/Louis-Aime
* @license MIT 2016-2022
*/
// Character set is UTF-8.
/* Version M2022-10-26 10 s timeout for loading XML file
*/
/* Copyright Louis A. de Fouquières https://github.com/Louis-Aime 2016-2022
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub-license, or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
1. The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
2. Changes with respect to any former version shall be documented.
The software is provided "as is", without warranty of any kind,
express of implied, including but not limited to the warranties of
merchantability, fitness for a particular purpose and non-infringement.
In no event shall the authors of copyright holders be liable for any
claim, damages or other liability, whether in an action of contract,
tort or otherwise, arising from, out of or in connection with the software
or the use or other dealings in the software.
*/
"use strict";
var // global variables at document level.
// all modules here once imported
// pldrDOM, // imported PLDR
modules, // imported modules
pldrDOM; // pldrDOM,
const // Promises of loading initial files. This a temporary version fills 'modules' and 'calendrical'
calendrical = {},
loadCalendrical = Promise.all([
import ('./fetchdom.js').then (
(value) => value.default ('https://louis-aime.github.io/calendrical-javascript/pldr.xml', 10000),
(error) => { throw 'Error loading standard modules' } // failure fetching pldr as XML file, fallback in next step
).then (
(value) => { pldrDOM = calendrical.pldrDOM = value }, // fetching XML file has succeeded.
(error) => { // fetching XML has failed, we use the fallback value
console.log ('Error fetching xml pldr file: ' + error + '\nfetching local pldr.js');
return import ("./pldr.js").then ( (value) => pldrDOM = calendrical.pldrDOM = value.default () )
}
),
import ('./time-units.js').then ( (value) => calendrical.TimeUnits = value.default ),
import ('./extdate.js').then ( (value) => calendrical.ExtDate = value.default ),
import ('./extdatetimeformat.js').then ( (value) => calendrical.ExtDateTimeFormat = value.default ),
import ('./calendars.js').then ( (value) => Object.assign (calendrical, value) )
]),
loadMilesian = Promise.all ([
import ('./deltat.js').then ( (value) => calendrical.getDeltaT = value.default ),
import ('./seasons.js').then ( (value) => Object.assign (calendrical, value) ),
import ('./calendarclock.js').then ( (value) => Object.assign (calendrical, value) ),
import ('./countconversion.js').then ( (value) => Object.assign (calendrical, value) ),
import ('./lunar.js').then ( (value) => Object.assign (calendrical, value) ),
import ('./yearsignature.js').then ( (value) => Object.assign (calendrical, value) ),
]),
loadComplete = Promise.all ([
loadCalendrical,
loadMilesian.then ( (value) => { modules = calendrical ; modules.Milliseconds = calendrical.TimeUnits } )
]);
</code></pre>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-calendarclock.html">calendarclock</a></li><li><a href="module-countconversion.html">countconversion</a></li><li><a href="module-deltat.html">deltat</a></li><li><a href="module-lunar.html">lunar</a></li><li><a href="module-seasons.html">seasons</a></li><li><a href="module-yearsignature.html">yearsignature</a></li></ul><h3>Classes</h3><ul><li><a href="module-calendarclock.SolarClock.html">SolarClock</a></li><li><a href="module-countconversion.ExtCountDate.html">ExtCountDate</a></li><li><a href="timeShift.html">timeShift</a></li></ul><h3>Interfaces</h3><ul><li><a href="clockAnimate.html">clockAnimate</a></li><li><a href="myTimeShift.html">myTimeShift</a></li></ul><h3>Global</h3><ul><li><a href="global.html#calcCustomDate">calcCustomDate</a></li><li><a href="global.html#calcJulianDay">calcJulianDay</a></li><li><a href="global.html#calcTime">calcTime</a></li><li><a href="global.html#calcWeek">calcWeek</a></li><li><a href="global.html#setDateToNow">setDateToNow</a></li><li><a href="global.html#setDateToToday">setDateToToday</a></li><li><a href="global.html#setUTCHoursFixed">setUTCHoursFixed</a></li><li><a href="global.html#undef">undef</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Mon Apr 15 2024 21:10:03 GMT+0200 (heure d’été d’Europe centrale)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>