New Plugin: TimeWise-Countdown, an inline deadline countdown

Dear all,
I wrote a new plugin, mainly for my own use, called TimeWise Countdown. The code is here: Felix Hollederer / TimeWise Countdown · GitLab

As I did not find a form to officially submit my plugin for adding it to Joplin Plugins I will post it here.

And I welcome everyone to share their opinion and valuable feedback.
(As a new member I cannot share multiple links and images, so I will post the readme in a later post)

4 Likes

TimeWise Countdown

TimeWise Countdown is a plugin that continually calculates and displays the time remaining until a specified deadline.

Demo

TimeWise Countdown is a plugin that continually calculates and displays the time remaining until a specified deadline. It allows easy customization and formatting.

([Back to top](#top))

Usage

TimeWise Countdown identifies special deadline markers in your text and replaces them with a live countdown. The markers follow this format:

[output](d[DEADLINE]{TEMPLATE})
  • output: The parsed template output
  • DEADLINE: The target time; if this date/time has passed, the plugin shows zeros.
    • Supported deadline formats:
      1. year-month-day:hour-minute (e.g., 2025-12-31:13-45)
      2. year-month-day (e.g., 2025-12-31)
      3. hour-minute (e.g., 13-45)
      4. Short years (less than 100) are interpreted as 20xx. For example, 25-12-31 -> 2025-12-31.
  • TEMPLATE: Specifies how the remaining time should be displayed. Separate tokens with underscores ( _ becomes a space).

Template Tokens

Each letter indicates how to count down:

  • y = Years
  • m = Months
  • w = Weeks
  • d = Days
  • H = Hours
  • M = Minutes

All non-token text (e.g., years, days, minutes) remains literal. For example:

y_years_d_days_M_minutes

could output something like 1 years 9 days 30 minutes.

Examples

  1. Full Date-Time

    [](d[2025-01-10:14-00]{y_years_d_days_H_hours})
    
    • Suppose today is 2024-01-01 00:00.
    • This might display: [1 years 9 days 14 hours](d[2025-01-10:14-00]{y_years_d_days_H_hours})
  2. Date Only

    [](d[2025-01-10]{m_months_d_days})
    
    • With a current date of 2024-01-01, you might see: [12 months 9 days](d[2025-01-10]{m_months_d_days}).
  3. Time Only

    [](d[15-30]{H_hours_M_minutes})
    
    • If it's currently 09:00, it could show: [6 hours 30 minutes](d[15-30]{H_hours_M_minutes}).
  4. Short Year

    [](d[25-01-01]{y_years_m_months})
    
    • Interpreted as 2025-01-01, so if we're in 2024-01-01, that might be: [1 years 0 months](d[25-01-01]{y_years_m_months}).
  5. Week Calculation

    [](d[2024-02-15]{w_weeks_d_days})
    
    • If only a few weeks remain until Feb 15, 2024, this might read: [2 weeks 3 days](...).
  6. Past Deadlines

    • If the deadline is in the past, all tokens become zero, e.g.:
    [](d[2023-12-31]{y_years_d_days_H_hours})
    

    becomes:

    [0 years 0 days 0 hours](d[2023-12-31]{y_years_d_days_H_hours})
    
([Back to top](#top))

Build

Prerequisites

Make sure you have Node.js (and npm) installed.

npm install npm@latest -g

Installation

  1. Clone the repo

    git clone https://gitlab.com/flxholle/timewise-countdown.git
    
  2. Install NPM packages

    npm install
    
  3. Build the plugin: The plugin is built using Webpack, which creates the compiled code in /dist

    npm run dist
    
  4. (Optional) Change git remote url to avoid accidental pushes to the base project

    git remote set-url origin https://gitlab.com/flxholle/timewise-countdown.git
    git remote -v # confirm the changes
    
([Back to top](#top))

Contributing

Contributions make open source amazing. If you have an idea or fix, please:

  1. Fork the Project
  2. Create a new branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request
([Back to top](#top))

License

Distributed under the MIT License. See LICENSE.txt for details.

5 Likes

I also published the plugin in npm: joplin-plugin-timewise-countdown - npm
If there is anything more I can do to get this added to Joplin Plugins please let me know

1 Like

Great job @flxholle, really loved this plugin.

I think @personalizedrefriger can help you with that.

The plugin is now available in Joplin: Joplin Plugins - TimeWise Countdown :tada:

5 Likes

Thanks a lot for this convenient and clever plugin.

I thought it didn't work, but you have to leave and come back to the note to have the result.
Nice job.

Yes, unfortunately if it would update immediately, it wouldn't let you finish typing the date, but immediately overwrite it with the first text matching the format

1 Like

Hey all, I added a count-up feature, that was suggested via a direct message.
In this mode the days are counted up, since a specific date has passed, e.g. good for tracking birthdays.
It works by using the letter u (for up) instead: [output](u[STARTDATE]{TEMPLATE}).
A longer explanation is in the README

FYI. If, while within Joplin, I go to Tools > Options > Plugins and search for timewise and then click on the link for the plugin, it does not go to a project page showing how it is used. Instead it leads to your more "these are the projects I am working on" page and I couldn't find TimeWise in that list of projects very readily. Plus, I had to translate it. (Heh. But that is not a big deal anymore.)

Anyway. The link on the plugin installation section of the application should lead to somewhere more sensible.

Thanks. I didnt know that, I thought that homepage is for the homepage of the developer (me), because there is also a repository_url (see here)
I will change it in the next update

1 Like