Date Calculator

This application is a date calculator aimed primarily for use by lawyers and other professionals that require quick calculation of deadlines. Its purpose is to make it easy to calculate how many days there are between two given dates, or to add or subtract a certain number of days from a given date. For example, working out the number of days between two dates to calculate an interest charge, or when a court filing date is due. It has a number of unique features that are essential for lawyers and other professionals.

Features

  • Determine the number of days between two dates
  • Add or subtract a number of days to or from a date
  • Perform calculations based on working days only
  • Perform calculations inclusive of start/end dates
  • Specify holidays based on a fixed date, relative dates, or lunar dependent dates
  • Save different sets of holidays as templates, useful for easily calculating dates based on different criteria
  • View the holidays for the current holiday set for different years
  • View the analysis of working days for each calculation
  • Create a PDF report for a calculation for filing purposes

License

Date Calculator is licensed under the GPLv2 license.

Dependencies

There are no dependencies for the Windows version.

The Linux version requires pyqt4. This should be available in your distribution’s repositories.

Installation

Linux Version

Download the tar.bz2 file below. Extract the file and change to the directory created with the following commands:

tar -jxpf date_calc_<version>.tar.bz2
cd date_calculator

To run the application, type ./date_calc_4.py. Alternatively, you could put a symlink to date_calc_4.py in a directory in your path:

ln -s /path/to/date_calculator/date_calc_4.py /usr/local/bin/date_calc

You should then be able to run Date Calculator by typing date_calc.

Windows Version

Download the setup.exe file below. Double click, click “Next, Next, Next etc”; done

If you come across this error when running it:

This application has failed to start because the application configuration is incorrect.

You will need to install the Microsoft Visual C++ runtime (not sure why, but there it is). You can get it here.

Screenshots

Roadmap

  • Set a range of dates as holidays
  • Load templates for holidays for particular purposes
  • Improve GUI

Downloads

If you use this application in your business, or simply find it useful, please make a donation to help with the ongoing maintenance and development of this application.


Linux/Source:

Version 1.0

Windows:

Version 1.0

  • #1 written by Mikey
    about 1 year ago

    I can install and use your program fine. Its great! but when I close it I get an error message “date_calc_4.exe has encountered a problem and needs to close”. any help would be great.

    • #2 written by admin
      about 1 year ago

      Is this on Windows or Linux?

    • #3 written by Name (required)
      about 1 year ago

      I receive the same error message. I’m using windows version.

      • #4 written by admin
        about 1 year ago

        I’ll check this out

  • #5 written by John
    about 1 year ago

    Hello,
    I am very impressed with your program. I am a printer working on a project for a client in California. I am not sure if it is feasible or not but I am looking for a program (windows) that will allow me put in a starting date and provide me with a report that will go up two years from that date with variable (my choice) intervals 1 week, 2 weeks, 6 months, 1 year, 2 years etc that will allow for removing weekends and holidays and tell me the dates on one sheet for that specific date. I would be willing to pay for this modification (if possible). Is this something that you might be able to provide?
    Thanks- John

    • #6 written by admin
      about 1 year ago

      I should be able to provide it. Can you explain it a little better. Do you want a report that shows the date at each (user selected) interval for a period, excluding weekends and holidays?

  • #7 written by John
    about 1 year ago

    Thanks,
    I will give it a shot. This would be a one page example:

    january 2, 2009

    1 week 1-9-2009
    2 weeks 1-16-2009
    3 Weeks 1-23-2009
    4 Weeks 1-30-2009

    1 month 2-2 2009
    2 months 3-2-2009
    also 3- 10 months

    1 year 1-4-2010
    2 years 1-3-2010

    10 days 1-12-2009
    Also- 20, 30, 45, 60, 90, 120, 160, 180

    This will be used for a quick reference daily calendar. Weekends and Holidays will not be included. It would be only text. It would be great if there were a way to save the information to pdf files.
    Thanks!

  • #8 written by Jerry T.
    about 1 year ago

    Hello,

    I am the mayor of a small municipality just north of Chicago. I have installed your Date Calculator and find it quite useful, especially for adding and subtracting dates for determining deadlines for projects.

    However I am getting the message upon exiting which states: “date_calc_4.exe has encountered a problem and needs to close”. I am using Window XP Professional. I noted in the comment section that you were going to look into this problem. It appears that was 2 months ago. Is there a ‘fix’?

    Thank you
    ..

    • #9 written by admin
      about 1 year ago

      Hi,

      I’ve had a lot else on recently. Obviously, this is just a hobby. I’ll try to have a look at it over the next week.

      Cheers

  • #10 written by Grigory
    about 1 year ago

    Hi!

    Your calculator seems to be what I am looking for. But.. It does not work.
    I am using ubuntu 10.04. I am Moscow, Russia. Here is my locale output:

    LANG=ru_RU.utf8
    LC_CTYPE=”ru_RU.utf8″
    LC_NUMERIC=”ru_RU.utf8″
    LC_TIME=”ru_RU.utf8″
    LC_COLLATE=”ru_RU.utf8″
    LC_MONETARY=”ru_RU.utf8″
    LC_MESSAGES=”ru_RU.utf8″
    LC_PAPER=”ru_RU.utf8″
    LC_NAME=”ru_RU.utf8″
    LC_ADDRESS=”ru_RU.utf8″
    LC_TELEPHONE=”ru_RU.utf8″
    LC_MEASUREMENT=”ru_RU.utf8″
    LC_IDENTIFICATION=”ru_RU.utf8″
    LC_ALL=

    The calc starts but when I try to:

    1. Input the start time in the calendar
    2. Input the end time in the calendar
    3. Press Get Interval
    4. I see only “Calculating answer …”

    In the console log I see this:

    inc_start:
    0
    inc_end
    0
    variable rules:
    []
    variable ext rules:
    []
    good friday:
    0
    easter monday:
    0
    fixed rules:
    []
    range rules:
    []
    Traceback (most recent call last):
    File “/usr/local/bin/date_calc”, line 452, in deltaDates
    text = str(answer) + working_matrix[int(self.f.workingDays.isChecked())] + ‘ days between ‘ + str(startdate.day()) + ‘ ‘ + str(startdate.toString(“MMMM”)) + ‘ ‘ + str(startdate.year()) + ‘ and ‘ + str(enddate.day()) + ‘ ‘ + str(enddate.toString(“MMMM”)) + ‘ ‘ + str(enddate.year()) + inclusive
    UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 0-5: ordinal not in range(128)

    BTW: When the calc start in the console log I see this:

    /usr/local/bin/date_calc:373: SyntaxWarning: import * only allowed at module level
    def addNumber(self):
    /usr/local/bin/date_calc:398: SyntaxWarning: import * only allowed at module level
    def subtractNumber(self):
    /usr/local/bin/date_calc:421: SyntaxWarning: import * only allowed at module level
    def deltaDates(self):
    /usr/local/bin/date_calc:421: SyntaxWarning: import * only allowed at module level
    def deltaDates(self):
    /usr/local/bin/date_calc:518: SyntaxWarning: import * only allowed at module level
    def saveTemplt(self):
    /usr/local/bin/date_calc:620: SyntaxWarning: import * only allowed at module level
    def setFixed(self):
    /usr/local/bin/date_calc:714: SyntaxWarning: import * only allowed at module level
    def writeConfig(self):
    Getting Configuration …
    Couldn’t get data from file. Using defaults …

    1.0
    Version Check: Update message already shown
    Version Check: This is the latest version
    Getting Configuration …
    Couldn’t get data from file. Using defaults …

    I hope you can do something with it.. I also suggest you move the project to ubuntu repo ;)

    Thanks anyway, the idea is very great! There are no analogs.

    • #11 written by admin
      about 1 year ago

      This looks like an encoding issue. Are you using utf-8?

      • #12 written by Grigory
        about 1 year ago

        Yes. Here’s the locale command output:

        LANG=ru_RU.utf8
        LC_CTYPE=”ru_RU.utf8″
        LC_NUMERIC=”ru_RU.utf8″
        LC_TIME=”ru_RU.utf8″
        LC_COLLATE=”ru_RU.utf8″
        LC_MONETARY=”ru_RU.utf8″
        LC_MESSAGES=”ru_RU.utf8″
        LC_PAPER=”ru_RU.utf8″
        LC_NAME=”ru_RU.utf8″
        LC_ADDRESS=”ru_RU.utf8″
        LC_TELEPHONE=”ru_RU.utf8″
        LC_MEASUREMENT=”ru_RU.utf8″
        LC_IDENTIFICATION=”ru_RU.utf8″
        LC_ALL=

        By the way. I tried to install the same version on windows 2008 and got THE SAME error in the logs.

      • #13 written by Grigory
        about 1 year ago

        Hi!

        Did you manage to check this issue?

        Thanks!

        • #14 written by admin
          about 1 year ago

          Not yet. Have been on holiday and only just got home. Will check it this weekend.

          • #15 written by Grigory
            about 1 year ago

            Hi :)

            I hope I had great holidays :)
            I really liked your calculator :)
            I hope someday you’ll check my issue..

            Thanks anyway!

          • #16 written by Grigory
            about 1 year ago

            Sorry, of course I meant YOU had a great holiday! :)

  • #17 written by Grigory
    about 1 year ago

    Hi, again!

    And here comes the feature request :)

    I’d like to be able to input start / end date in some textbox. Like it is done in a usual calculator. Most of the time such input is more speedy than mouse. But the calendars must stay of course.

    Thanks!

  • #18 written by Glenn
    about 11 months ago

    I am using your windows Date Calculator and find it great. Fantastic product! One difficulty I am having however is in entering a holiday that changes each year depending on the day of the week it lands on. Typically if the holiday lands on a weekend then the following Monday is the holiday. I cannot see how to set this up in your calculator.

No trackbacks yet.