CodeCogs - An iteractive open source Numerical library Welcome... Login
CodeCogs
shopping cart
OSXWindowsLinux
Search CodeCogs
Numerical Components

Valid RSS

UnitsDate

constants

Available under GPL (Free) and Commercial licence
get a GPL licence
COST (GBP)
this unit 0.00
sub units 0.00
add a commercial licence to your cart
0
viewed 2852 times and licensed 118 times

Calenders: Gregorian, Julian and Excel

Controller: CodeCogs  Contact Controller
+View version details
Contents hide toc
buy now     get GPL     add to cart

Interface

#include <codecogs/units/date/constants.h>

using namespace Units::Date;

enumcalendar
Calenders: Gregorian, Julian and Excel
enumdateDiffType
Methodologies for creating 360day accounting year: USA or European.
enumweekNumStd
Methods for calculating week number: Simple, Excel or ISO8601
enumweekdays
Days of the Week from Sunday (1) through to Saturday (7) - Type 1 methodology.
enummonths
Months of the year: Janurary (1) through to December (12).

Other Documentation

 
calendar
ModeDescription
cal_JulianThe Julian calendar was introduced in 45BC and was commonly used until the late 16 century. The Julian calendar is 365 1/4 days long, which gives an error of 1 day in every 128 years.
cal_GregorianThe Gregorian calendar was first introduced in 1582 by predominantly Catholic countries, to rectify the error in the Julian calendar. This change occurred on the 4th October 1582, with 10 days being lost, such that 15th October was the next day. Over the next 500 years, the majority of the world has adopted this standard, the main exceptions being the Greek and Russian Orthodox churches, which still use the Julian calendar.
cal_ExcelThe Excel date system isn't an official date system, but we use it here to provide compatibility to Microsoft Excel referring to a system that starts on 1 Jan 1900, such that years values below 1900, are assumed to be 1900+year. e.g. 20 is 1920; 110 is 2010. Excel on the Mac doesn't allow value prior to 1 January 1904, however for all practical purposes this limitation can be ignored. Aside from this peculiarity, both Excel date systems are identical to the Gregorian system.
Source Code:

To view or download source code you need either a GPL or Commercial Licence.

buy now     get GPL     add to cart

Not a member, then Register with CodeCogs. Already a Member, then Login.


 
dateDiffType
TypeDescription
dd_EuropeStart or end dates that occur on the 31st of a month become equal to the 30th of the same month.
dd_USAThis is identical to the European system with one exception that applies only to end dates: If the end date occurs on the 31st of a month it is moved to the 1st of the next month if the start date is earlier than the 30th. This method is sometime also called the 'NASD' method.
Source Code:

To view or download source code you need either a GPL or Commercial Licence.

buy now     get GPL     add to cart

Not a member, then Register with CodeCogs. Already a Member, then Login.


 
weekNumStd

StandardDescription
wkn_Simple The simple week numbering scheme:
  • week 1 starts on the 1st January of any given year
  • week n+1 starts 7 days after week n
wkn_Excel The Microsoft Excel numbering scheme:
  • week 1 starts on the 1st January of any given year
  • weeks also start on a Monday (resulting in short week 1's)
wkn_ISO The ISO8601 standard that defines a week number as:
  • weeks start on a Monday.
  • week 1 of a given year is the one that includes the first Thursday of that year or (equivalently) the week that includes January 4th.
Source Code:

To view or download source code you need either a GPL or Commercial Licence.

buy now     get GPL     add to cart

Not a member, then Register with CodeCogs. Already a Member, then Login.


Page Comments

Format Excel Equations

  You must login to leave a messge


Last Modified: 18 Oct 07 @ 17:07     Page Rendered: 2010-03-11 04:09:34

Valid CSS!   Valid XHTML 1.0 Transitional