]> git.piffa.net Git - arduino/blob - books/beginning_c_code/Chapter12/Dates/Dates.h
first commit
[arduino] / books / beginning_c_code / Chapter12 / Dates / Dates.h
1 /*\r
2   Dates.h - Library for finding is a year is a leap year\r
3              and the date for Easter for a given year.\r
4   Created by: Jack Purdum, Sept. 10, 2012\r
5   Released into the public domain.\r
6 */\r
7 #ifndef Dates_h\r
8   #define Dates_h\r
9 \r
10   #include "Arduino.h"\r
11   \r
12   class Dates\r
13   {\r
14     public:\r
15     #define ASCIIZERO 48          // character for 0 in ASCII\r
16 \r
17     struct easter {\r
18       int month;\r
19       int day;\r
20       int year;\r
21       int leap;\r
22       char easterStr[11];\r
23     };\r
24     struct easter myEaster;\r
25                               // Function prototypes:\r
26     int IsLeapYear(int year);\r
27     void GetEaster(Dates *myEaster);\r
28   };\r
29 #endif\r