The clock used on the Pendorwright site.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Elf M. Sternberg fd75bb82e7 Added running instructions. 1 year ago
src Make the clock its own little project. 1 year ago
.eslintrc.json Make the clock its own little project. 1 year ago
.gitignore Make the clock its own little project. 1 year ago
.pre-commit-config.yaml Make the clock its own little project. 1 year ago
.prettierrc Make the clock its own little project. 1 year ago
LICENSE.md Make the clock its own little project. 1 year ago
README.md Added running instructions. 1 year ago
index.html Make the clock its own little project. 1 year ago
package-lock.json Added running instructions. 1 year ago
package.json Added running instructions. 1 year ago
tsconfig.json Make the clock its own little project. 1 year ago
vite.config.js Make the clock its own little project. 1 year ago

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.