Skip to content

Kotlin project that deals with The Stick Calendar (in Danish: Pindsekalenderen), which is a new calendar system based on pentecost day developed by Danish Stick Association (in Danish: Dansk Pind Union). In addition to a shared Kotlin Multiplatform module, this contains various UI-facing modules, including a Chrome extension made with KotlinJS.

License

Notifications You must be signed in to change notification settings

spilpind/stick-calendar

Repository files navigation

The Stick Calendar

Kotlin project that deals with The Stick Calendar (in Danish: Pindsekalenderen), which is a new calendar system based on pentecost day developed by Danish Stick Association (in Danish: Dansk Pind Union). Since this was originally made for a Danish audience, most user-facing texts will be in Danish for now.

Modules

The project contains a common module which main purpose is to deal with core logic of the calendar system. Furthermore, there is a few modules that in their own ways helps the user navigating in the new calendar.

The headers below here reflect the name of the module folder.

common

Kotlin Multiplatform module that contains core logic and various utilities that makes it easier to create implementations related to the calendar system. For now this is only used by Kotlin/JS modules, but is still a multiplatform module such that it's ready for future projects and also to test out the possibilities with such module type.

This module uses kotlinx-datetime in order to deal with the gregorian calendar.

website

Kotlin/JS module that with help from Kotlin wrappers and React (including a custom wrapper around React Datepicker) sets up a website with various converter tools such that the user can convert to/from stick dates.

In this website certain elements are replaced with both input and output elements that deals with the conversion. The implementation is done like this such that it's easier for the content creator to set up the webpage without needing to access this repository. To see it in action, check out https://spilpind.dk/pindsekalenderen.

Building the module

During development, the module can be built and launched with an example HTML page containing all relevant elements by simply calling ./gradlew :website:browserRun (in IntelliJ, look for the Gradle task called browserRun in stick-calendar/website/kotlin browser), or a similar task.

When the module needs to be deployed, call ./gradlew :website:browserDistribution (in IntelliJ, look for the Gradle task called browserDistribution in stick-calendar/website/kotlin browser). After successful build, a JavaScript file by the name stick-calendar.js can be found in website/build/distributions and should just be executed in a webpage set up with the relevant elements.

In case of any unexpected errors during build, feel free to contact one of the contributors.

chrome-extension

Chrome extension built with Kotlin/JS. The extension simply replaces all gregorian dates in all websites to their counterpart in The Stick Calendar with help from Kotlin's DOM API.

The extension works best with Danish texts (since the pattern for instance searches for Danish month names), but also works with more generic dates like 20/3-1990. If this readme for example is viewed at GitHub in a Chrome browser with the extension installed that date should be converted to 19\.311.

The extension is released to Chrome Webshop and can be found here.

Build and distribute

In order to build/assemble everything needed to run or distribute the extension call ./gradlew :chrome-extension:browserDistribution (in IntelliJ, look for the Gradle task called browserDistribution in stick-calendar/chrome-extension/kotlin browser). All resources and the compiled JavaScript file needed for the distribution will after this be located in chrome-extension/build/distributions.

During development this output folder can also be used by loading it as an unpacked extension.

In case of any unexpected errors during build, feel free to contact one of the contributors.

About Stick Calendar

The Stick Calendar in short is a new calendar format with origin in pentecost day 1970. Each year starts by pentecost day and ends right before pentecost day next year. For example year 0 start May 17th 1970 and ends May 29th 1971. Dates from year 0 and onwards are denoted as YY\.DDD and dates before year 0 are denoted as YY./DDD.

The reason for the name and the association with pentecost is more clear when you look at it in Danish, where "stick" translates to "pind". Pind is a game similar to some aspects of tip-cat and the sport is organized by Danish Stick Association. Furthermore, "pentecost" translates to "pinse" in Danish and because of the similarity between the two words "pind" and "pinse", the calendar has its origin in pentecost. In Danish, the name of the calendar system also mixes these two words into Pindsekalenderen. We have however not found a similar good mix between "pentecost" and "stick" in English yet, but let us know if you have any good suggestions.

About

Kotlin project that deals with The Stick Calendar (in Danish: Pindsekalenderen), which is a new calendar system based on pentecost day developed by Danish Stick Association (in Danish: Dansk Pind Union). In addition to a shared Kotlin Multiplatform module, this contains various UI-facing modules, including a Chrome extension made with KotlinJS.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published