month
Extracts the month from a serial Julian date.
Excel: MONTH
Controller: CodeCogs
Contents
Dependents
Interface
C++
Month
intmonth( | int | nDate | |
calendar | dateSystem = cal_Gregorian | )[inline] |
Example 1
#include <stdio.h> #include <codecogs/units/date/month.h> using namespace Units::Date; int main() { printf("\n The month is %d", month(1741664)); // The month is 5 printf("\n The month is %d", month(1741664, cal_Julian)); // The month is 6 return 0; }
- cal_Gregorian (default)
- cal_Julian
- cal_Excel (same as Gregorian)
Note
- It may be faster to simply use dateYMD, particularly if you also need the day and year from a date.
Parameters
nDate is a serial number of days from 24 November 4714 BC (1 January 4713BC in the Julian Calendar) - also known as the Julian Period. dateSystem selects which date system should be used (see constants):
Authors
- Will Bateman (Sep 2004)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.