Friday, December 26, 2025

Python program for calculating office's dates

 mbf_date: A small command-line tool that prints dates based on simple rules.

It can output:

  • the current date
  • the previous date
  • the next date

Optionally, it can treat Saturday and Sunday as non-business days, so:

  • previous business date skips weekends backward
  • next business date skips weekends forward

You can also specify the output format using Python strftime patterns.

Source code:  https://github.com/64board/Python/blob/main/mbf_date.py

 

No comments: