2021-11-16 03:27:41 +00:00
|
|
|
# The Pendor Clock
|
|
|
|
|
|
|
|
This is code that's been around since 1996 or so, and is one of the
|
|
|
|
three first Javascript programs I ever wrote. It's just the "time of
|
|
|
|
day" counter for the fictional world that's the setting of my
|
|
|
|
long-running [space opera
|
|
|
|
series](https://www.pendorwright.com/journals/). It has its own
|
|
|
|
calendar, and unlike Star Trek, I had in mind what the "star dates"
|
|
|
|
would mean early on.
|
|
|
|
|
|
|
|
# Motivation
|
|
|
|
|
|
|
|
This is a slightly modernized version, just to see what it would be
|
|
|
|
like to write this in 2021. The answer is that not much has changed;
|
|
|
|
the code runs just fine, although `getYear()` has been deprecated,
|
|
|
|
replaced by `.geUTCFullYear()`. The syntax of 2021 Javascript is a lot
|
|
|
|
nicer than 1996, although there is a limit to how much density one can
|
|
|
|
achieve when it's a lot of fiddly calculations around converting
|
|
|
|
human-readable dates into Pendorian-readable ones.
|
|
|
|
|
|
|
|
What this project _really_ involves is preserving the basic elements
|
|
|
|
of prettier, eslint, vitejs, and typescript that I routinely use these
|
|
|
|
days as the basis of my Javascript work. Most of the configuration
|
|
|
|
files are short, as you'd expect from a vanilla javascript project
|
|
|
|
with a single source file and no framework, but they do include things
|
|
|
|
like sourcemap inclusion, minification, and using rollup to generate
|
|
|
|
proper EcmaScript-6.
|
|
|
|
|
2021-11-16 03:41:26 +00:00
|
|
|
# Running it
|
|
|
|
|
|
|
|
Really? Okay:
|
|
|
|
|
|
|
|
```
|
|
|
|
$ npm install
|
|
|
|
$ npm run dev
|
|
|
|
```
|
|
|
|
|
|
|
|
The demo will be on port 3000 by default.
|
|
|
|
|
2021-11-16 03:27:41 +00:00
|
|
|
# License
|
|
|
|
|
|
|
|
This code is released under the Mozilla 2.0 Public License. A copy of
|
|
|
|
the License File is included in this folder.
|