The clock used on the Pendorwright site.
Go to file
Elf M. Sternberg fd75bb82e7 Added running instructions.
Updated the name: apparently I couldn't decide if it was 'pendordate'
or 'pendorclock'.  The repo ended with "clock," so "clock" it is.
2021-11-15 19:41:26 -08:00
src Make the clock its own little project. 2021-11-15 19:27:41 -08:00
.eslintrc.json Make the clock its own little project. 2021-11-15 19:27:41 -08:00
.gitignore Make the clock its own little project. 2021-11-15 19:27:41 -08:00
.pre-commit-config.yaml Make the clock its own little project. 2021-11-15 19:27:41 -08:00
.prettierrc Make the clock its own little project. 2021-11-15 19:27:41 -08:00
LICENSE.md Make the clock its own little project. 2021-11-15 19:27:41 -08:00
README.md Added running instructions. 2021-11-15 19:41:26 -08:00
index.html Make the clock its own little project. 2021-11-15 19:27:41 -08:00
package-lock.json Added running instructions. 2021-11-15 19:41:26 -08:00
package.json Added running instructions. 2021-11-15 19:41:26 -08:00
tsconfig.json Make the clock its own little project. 2021-11-15 19:27:41 -08:00
vite.config.js Make the clock its own little project. 2021-11-15 19:27:41 -08:00

README.md

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. 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.

Running it

Really? Okay:

$ npm install
$ npm run dev

The demo will be on port 3000 by default.

License

This code is released under the Mozilla 2.0 Public License. A copy of the License File is included in this folder.