en cz  
2012-10-27

Thanks to a few people from the Debain community - new version 3.0 released (see ChangeLog) for more info

2003-07-17

Version 2.3 released.

2003-05-22

Version 2.2 released

2002-12-09

Version 2.1 released

2002-03-29

Version 2.0 released

2000-10-25

Version 1.1 released

RSS
Mencal is a simple variation of the well-known unix command cal. The main difference is that you can have some periodically repeating days highlighted in color. This can be used to track menstruation (or other) cycles conveniently.

This program is written in the perl language. It also uses the unix locales and the system commands strftime and mktime. I don't know which systems have all those, but at least any Linux distribution should include everything necessary for running this software.

This software can be distributed and modified freely under the terms of GPL license.

Hint:
Use your computer for superb timing of all your activities

Installation is simple, just unpack the main package, enter the newly created directory and run it:

$ tar xzf mencal-x.y.tar.gz
$ cd mencal-x.y
$ ./mencal

You can of course place the main file mencal to any directory where other programs are being installed (sometimes you have to have the superuser permissions), for example:

# cp mencal /usr/local/bin/

The output of mencal can be influenced using output parameters, which are similar to parameters of cal:

  • -m or --monday .. week begins on monday (default sunday)
  • -1 .. print just current month (default)
  • -3 .. print previous, current and next month
  • -y [yyyy] .. print calendar for the whole year yyyy, if the year is not specified, print current year
  • -q or --quiet .. don't print the introduction
  • -n or --nocolor .. don't use color in the output
  • -i COLOR nebo --icolor COLOR .. intersection color (default is red, other possibilities are: green, blue, yellow, violet, cyan, shiny (intense white) and bold (not really a color)
  • -h or --help .. print help - list of parameters
  • -V or --version .. print version information

You can also use parameters for cycle, they can be specified more than once, thus more cycles in one calendar will be printed:

  • FILE .. filename with cycle parameters
  • -c PARAMETERS or --config PARAMETERS .. list of cycle parameters, comma separated, no spaces allowed:
    • s=[yyyy]mmdd or start=[yyyy]mmdd .. first day of a cycle (default today)
    • l=LL or length=LL .. legth of a cycle (days, default 28)
    • d=D or duration=D .. duration of menstruation (days, default: 4)
    • n=NAME or name=NAME .. name of subject, optional parameter
    • f=FILE or file=FILE .. filename to save configuration to (only menstruation related variables will be saved)
    • c=COLOR or color=COLOR .. color used for menstruation days of subject (available colors are the same as with --icolor)

Screenshots of running the software with various parameters:

Normal use, printing of tree actual months

mencal -3
Normal use with more parameters

mencal -3 -m -c s=20110306,l=30,d=7,n=Kamila,c=yellow
All-year calendar of two subjects, one of them being setup with list of parameters and the other one being setup with a file marierc, overlapped days are red

mencal -y -m -c s=20110306,l=30,d=7,n=Kamila,c=yellow marierc
All-year calendar without the use of colors

mencal -n -y -m -c s=20110306,l=30,d=7,n=Kamila,c=yellow marierc
An example of output when everything is a bit overwhelmed

mencal -m -y -i red -c s=0517,l=23,d=4,n=Kamila,c=green -c s=1117,l=30,d=6,n=Petra,c=cyan -c s=0105,l=28,d=5,n=Magda,c=yellow -c s=0303,l=26,d=5,n=Pavlina,c=violet -c s=0813,l=23,d=4,n=Adela,c=shiny -c s=0502,l=35,d=7,n=Karolina,c=blue -c s=0406,l=22,d=5,n=Varonika,c=bold
The same chaos, colorless

mencal -n -m -y -i red -c s=0517,l=23,d=4,n=Kamila,c=green -c s=1117,l=30,d=6,n=Petra,c=cyan -c s=0105,l=28,d=5,n=Magda,c=yellow -c s=0303,l=26,d=5,n=Pavlina,c=violet -c s=0813,l=23,d=4,n=Adela,c=shiny -c s=0502,l=35,d=7,n=Karolina,c=blue -c s=0406,l=22,d=5,n=Varonika,c=bold

Select version:

Version:
Date:
Size:
MD5:
Direct link:

There are no known bugs at this moment. Ifcase you find some, please let me know at mccohy@kyberdigi.cz.

2012-04-12

A wrong day might be highlight if the program is executed on the day, when daylight saving time is being turned on or off. The computation was like adding or subtracting 24 hours to current time, which could highlight a wrong day. Thanks to Holger Mikolon for bug report and solution.
Solved: upgrade to version 2.4.

2003-07-17

In some cases of special locales setings the day names are displayed incorrectly. For example if one uses hu_HU, some day names have only one character, which can cause table damage. Thank to Peter Gervai for bug info.
Solved: upgrade to version 2.3.

2003-05-22

Micah Anderson wrote about a typo in one of error messages you can see after bad parameter settings.
Solved: upgrade to version 2.2.

2002-12-09

While using the -3 switch for printing of three actual months (i.e. november, december, january) some month is not printed. Reported by Jįra Altmann.
Solved: upgrade to version 2.1.

2000 - 2003

If using the command more and colored mencal, i. e. $ mencal -y -c c=red | more .. it all gets messed up.
Solved: use more -f or less -R. hanks to Peter K. Gale for this hint.

Regrettably you can't use years below 1900. The cause is that perl works with years decremented by 1900. So if you use the year 2002, perl has to convert it to 102. And it of course refuses to use negative numbers. If you have any ideas how to work around this, please let me know.

The names of days and months are taken from locales, so it would probably be nice to localize the help and program messages. There are not that many messages, in fact. Well, next time. ;-)

It is impossible to print colored output ($ mencal | lpr), the output on the paper looks really ugly. Please use non-colored output if you want to print it on your printer, i. e. $ mencal -n | lpr

Note:
There's only a few lines left from 1.0 and the rest was completely rewritten. The old bugs seem to be gone. The configuration doesn't become invalid after one year and you don't have to set it up again. The brain-damage of the old configuration files has also been eliminated.

2013-10-27

Version 3.0

  • massive code overwrite (Toni Timonen, Sam Hocevar, Matthew Wilcox)
  • minor fixes and corrections (Scott Barker, Charles Plessy)

2012-04-12

Version 2.4

  • fixed incorrect computation in days, when daylight saving time is being turned on or off

2003-07-17

Version 2.3

  • fixed incorrect displaying of some day names

2003-22-05

Version 2.2

  • fixed error message typo

2002-12-09

Version 2.1

  • bugfix: some months are not printed if '-3' is used
  • optimization of counting menstruation days

2002-03-29

Version 2.0

  • initial primitive version total rewrited
  • more configurations available
  • merging of configurations
  • other program switches
  • non-colored output
  • actual three months can be printed

2000-10-25

Version 1.1

  • configuration can be saved
  • minor bigfixes
  • localization (use of locales)

Mesozoic era

Version 1.0

  • initial primitive version

I thank Vinil for the his intensive cooperation, inspiration and propagation (the hint on the homepage is from him too) and JD for testing, moral backing and correction.

An inspiring response from the maintainer of the mencal Debian package:

I really love this script, because nobody but you ever bothered writing it :-) I am very proud of you because you wrote this for your girlfriend and I guess that was an act of love :-)

Thankful letter from Luca Sironi:

Thank you for mencal! I use your script in order to track in red my work nightly emergency availability. The maximum will be an integration with the calendar unix command. Some kind of writable text on the right of the month calendar ;-)

An amazing reply from Thomas Long:

My wife and I rely on your program every time we need to plan big things like trips, vacations, extended bike rides, etc. Your program is a really wonderful contribution to Debian GNU/Linux. In the US, it is not unusual for women to be very embarrassed about menstruation - even to the point that they will not use the word. My wife is that way. But she has no problem saying things like, "MenCal's here!" :)

Peace be with you.

A bit unconventional usage of the program from Holger Mikolon:

Thanks for the practical tool mencal, which I use on my OpenBSD laptop for the purpose to highlighting the current day of month. I use the following command line to do that:
mencal -m -q -c l=31,d=1