/Users/andrea/_magisterarbeit/korpus/clean/trainkorpus/32/file12.html NN ----------------------------------------- : Code NP Capsule NN A DT C NP Date NN Class NP , , Part NP 2 CD Chuck NP Allison NP Chuck NP Allison NP is VBZ a DT software NN architect NN for IN the DT Family NP History NN Department NP of IN Jesus NP Christ NP of IN Latter JJ Day NP Saints NNS Church NP Headquarters NN in IN Salt NP Lake NP City NP . SENT He PP has VHZ a DT B NN . SENT S NP . SENT and CC M NP . SENT S NP . SENT in IN mathematics NN , , has VHZ been VBN programming VVG since IN 1975 CD , , and CC has VHZ been VBN teaching VVG and CC developing VVG in IN C NP since IN 1984 CD . SENT His PP$ current JJ interest NN object VVP oriented JJ technology NN and CC education NN . SENT He PP is VBZ a DT member NN of IN X NP 3 CD J NP 16 CD , , the DT ANSI NP C NP Standards NPS Committee NP . SENT Chuck NP can MD be VB reached VVN on IN the DT Internet NN at IN allison NP decus NN . SENT org NP , , or CC at IN 801 CD 240 CD 4510 CD . SENT Listing NN 1 CD Introduces VVZ a DT function NN to TO compare VV dates NNS date NN 4 CD . SENT h NN class NN Date NN int NP month NN . SENT int NP day NN . SENT int NP year NN . SENT public JJ . SENT Constructors NNS Date VVP month NN day NN year NN 0 CD . SENT Date NN int NP m NN , , int NP d SYM , , int NP y NP month NN m NN . SENT day NN d SYM . SENT year NN y NN . SENT Accessor NP Functions NNS int NP get VV month NN const NN return NN month NN . SENT int NP get VVP day NN const NN return NN day NN . SENT int NP get VVP year NN const NN return NN year NN . SENT Date NN interval NN const NN Date NN const NN . SENT int NP compare VVP const JJ Date NN const NN . SENT . SENT End NN of IN File NP Listing VVG 2 CD Implements VVZ the DT interval NN and CC compare VV member NN functions NNS date NN 4 CD . SENT cpp NNS include VVP date NN 4 CD . SENT h NN inline NN int NP isleap NP int NP y NP return NN y NP 4 CD 0 CD y NN 100 CD . SENT 0 CD y NN 400 CD 0 CD . SENT static JJ int NP dtab NP 2 CD 13 CD 0 CD , , 31 CD , , 28 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 0 CD , , 31 CD , , 29 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD . SENT Date NN Date NN . SENT . SENT interval NN const NN Date NN d SYM 2 CD const NN static JJ Date NN result NN . SENT int NP months NNS , , days NNS , , years NNS , , prev NP month NN . SENT Compute VV the DT interval NN assume VVP d NN 1 CD precedes VVZ d NN 2 CD years NNS d SYM 2 CD . SENT year NN year NN . SENT months NNS d SYM 2 CD . SENT month NN month NN . SENT days NNS d SYM 2 CD . SENT day NN day NN . SENT Do VV obvious JJ corrections NNS days NNS before IN months NNS . SENT This DT is VBZ a DT loop NN in IN case NN the DT previous JJ month NN is VBZ February NP , , and CC days NNS 28 CD . SENT prev NP month NN d SYM 2 CD . SENT month NN 1 CD . SENT while IN days NNS 0 CD Borrow NP from IN the DT previous JJ month NN if IN prev NP month NN 0 CD prev NP month NN 12 CD . SENT months NNS . SENT days NNS dtab NN isleap NN d SYM 2 CD . SENT year NN prev NP month NN . SENT if IN months NNS 0 CD Borrow NP from IN the DT previous JJ year NN years NNS . SENT months NNS 12 CD . SENT Prepare VV output NN result NN . SENT month NN months NNS . SENT result NN . SENT day NN days NNS . SENT result NN . SENT year NN years NNS . SENT return NN result NN . SENT int NP Date NN . SENT . SENT compare VV const NN Date NN d SYM 2 CD const JJ int NP months NNS , , days NNS , , years NNS , , order NN . SENT years NNS year NN d NN 2 CD . SENT year NN . SENT months NNS month NN d NN 2 CD . SENT month NN . SENT days NNS day NN d NN 2 CD . SENT day NN . SENT return NN 0 CD , , 0 CD , , or CC 0 CD , , like IN strcmp NN if IN years NNS 0 CD months NNS 0 CD days NNS 0 CD return NN 0 CD . SENT else RB if IN years NNS 0 CD months NNS 0 CD return NN days NNS . SENT else RB if IN years NNS 0 CD return NN months NNS . SENT else RB return NN years NNS . SENT End NN of IN File NP Listing VVG 3 CD Tests NNS the DT compare VVP member NN function NN tdate NN 4 CD . SENT cpp NNS include VVP stdio NN . SENT h NN include VVP date NN 4 CD . SENT h NN void NN compare VVP dates NNS const JJ Date NN d SYM 1 CD , , const NN Date NN d SYM 2 CD int NP compval NP d SYM 1 CD . SENT compare NN d SYM 2 CD . SENT char NN compstr NN compval JJ 0 CD . SENT precedes VVZ . SENT compval NN 0 CD . SENT follows VVZ . SENT equals VVZ . SENT printf NN d NN d NN d SYM s PP d NN d NN d SYM n NN , , d NN 1 CD . SENT get VV month NN , , d NN 1 CD . SENT get VV day NN 0 CD , , d NN 1 CD . SENT get VV year NN , , compstr NP , , d NN 2 CD . SENT get VV month NN , , d NN 2 CD . SENT get VV day NN , , d NN 2 CD . SENT get VV year NN . SENT main JJ Date NN d SYM 1 CD 1 CD , , 1 CD , , 1970 CD . SENT compare VV dates NNS d SYM 1 CD , , Date NN 10 CD , , 1 CD , , 1951 CD . SENT compare VV dates NNS d SYM 1 CD , , Date NN 1 CD , , 1 CD , , 1970 CD . SENT compare VV dates NNS d SYM 1 CD , , Date NN 12 CD , , 31 CD , , 1992 CD . SENT return NN 0 CD . SENT OUTPUT NN 1 CD 1 CD 1970 NP follows VVZ 10 CD 1 CD 1951 JJ 1 CD 1 CD 1970 NP equals VVZ 1 CD 1 CD 1970 JJ 1 CD 1 CD 1970 NP precedes VVZ 12 CD 31 CD 1992 CD End NN of IN File NP Listing VVG 4 CD Defines VVZ relational JJ operators NNS for IN the DT Date NN class NN date NN 5 CD . SENT h NN class NN Date NN int NP month NN . SENT int NP day NN . SENT int NP year NN . SENT public JJ . SENT Constructors NNS Date VVP month NN day NN year NN 0 CD . SENT Date NN int NP m NN , , int NP d SYM , , int NP y NP month NN m NN . SENT day NN d SYM . SENT year NN y NN . SENT Accessor NP Functions NNS int NP get VV month NN const NN return NN month NN . SENT int NP get VVP day NN const NN return NN day NN . SENT int NP get VVP year NN const NN return NN year NN . SENT Date NN interval NN const NN Date NN const NN . SENT int NP compare VVP const JJ Date NN const NN . SENT Relational NP operators NNS int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN . SENT const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD . SENT 0 CD . SENT int NP operator NN . SENT const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD . SENT 0 CD . SENT . SENT End NN of IN File NP Listing VVG 5 CD Uses NNS the DT Date NN relational JJ operators NNS tdate NN 5 CD . SENT cpp NNS include VVP stdio NN . SENT h NN include VVP stdlib NN . SENT h NN include VVP date NN 5 CD . SENT h NN void NN compare VVP dates NNS const JJ Date NN d SYM 1 CD , , const NN Date NN d SYM 2 CD char NN compstr NN d SYM 1 CD d NN 2 CD . SENT precedes VVZ . SENT d SYM 1 CD d NN 2 CD . SENT follows VVZ . SENT equals VVZ . SENT printf NN d NN d NN d SYM s PP d NN d NN d SYM n NN , , d NN 1 CD . SENT get VV month NN , , d NN 1 CD . SENT get VV day NN , , d NN 1 CD . SENT get VV year NN , , compstr NP , , d NN 2 CD . SENT get VV month NN , , d NN 2 CD . SENT get VV day NN , , d NN 2 CD . SENT get VV year NN . SENT main JJ Date NN d SYM 1 CD 1 CD , , 1 CD , , 1970 CD . SENT compare VV dates NNS d SYM 1 CD , , Date NN 10 CD , , 1 CD , , 1951 CD . SENT compare VV dates NNS d SYM 1 CD , , Date NN 1 CD , , 1 CD , , 1970 CD . SENT compare VV dates NNS d SYM 1 CD , , Date NN 12 CD , , 31 CD , , 1992 CD . SENT return NN 0 CD . SENT OUTPUT NN 1 CD 1 CD 1970 NP follows VVZ 10 CD 1 CD 1951 JJ 1 CD 1 CD 1970 NP equals VVZ 1 CD 1 CD 1970 JJ 1 CD 1 CD 1970 NP precedes VVZ 12 CD 31 CD 1992 CD End NN of IN File NP Listing VVG 6 CD Adds VVZ binary JJ and CC unary JJ minus NN to TO the DT Date NN class NN date NN 6 CD . SENT h NN class NN Date NN int NP month NN . SENT int NP day NN . SENT int NP year NN . SENT public JJ . SENT Constructors NNS Date VVP month NN day NN year NN 0 CD . SENT Date NN int NP m NN , , int NP d SYM , , int NP y NP month NN m NN . SENT day NN d SYM . SENT year NN y NN . SENT Accessor NP Functions NNS int NP get VV month NN const NN return NN month NN . SENT int NP get VVP day NN const NN return NN day NN . SENT int NP get VVP year NN const NN return NN year NN . SENT Date NN operator NN const NN Date NN d SYM 2 CD const NN . SENT Date NN operator NN month NN month NN . SENT day NN day NN . SENT year NN year NN . SENT return VV this DT . SENT int NP compare VVP const JJ Date NN const NN . SENT Relational NP operators NNS int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN . SENT const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD . SENT 0 CD . SENT . SENT End NN of IN File NP Listing VVG 7 CD Implements VVZ the DT binary NN minus CC operator NN date NN 6 CD . SENT cpp NNS include VVP assert VV . SENT h NN include VVP date NN 6 CD . SENT h NN inline NN int NP isleap NP int NP y NP return NN y NP 4 CD 0 CD y NN 100 CD . SENT 0 CD y NN 400 CD 0 CD . SENT static JJ int NP dtab NP 2 CD 13 CD 0 CD , , 31 CD , , 28 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 0 CD , , 31 CD , , 29 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD . SENT Date NN Date NN . SENT . SENT operator NN const NN Date NN d SYM 2 CD const JJ int NP months NNS , , days NNS , , years NNS , , prev NP month NN , , order NN . SENT const NN Date NN first JJ , , last JJ . SENT Must MD know VV which WDT date NN is VBZ first JJ if IN compare VVP d NN 2 CD 0 CD this NN d SYM 2 CD order NN 1 CD . SENT first RB this DT . SENT last NN d SYM 2 CD . SENT else JJ order NN 1 CD . SENT first NN d SYM 2 CD . SENT last JJ this NN . SENT Compute VV the DT interval NN . SENT first JJ last JJ years NNS last JJ year NN first JJ year NN . SENT months NNS last JJ month NN first JJ month NN . SENT days NNS last JJ day NN first JJ day NN . SENT assert VV years NNS 0 CD months NNS 0 CD days NNS 0 CD . SENT Do VV obvious JJ corrections NNS days NNS before IN months NNS . SENT This DT is VBZ a DT loop NN in IN case NN the DT previous JJ month NN is VBZ February NP , , and CC days NNS 28 CD . SENT prev NP month NN last JJ month NN 1 CD . SENT while IN days NNS 0 CD Borrow NP from IN the DT previous JJ month NN if IN prev NP month NN 0 CD prev NP month NN 12 CD . SENT months NNS . SENT days NNS dtab NN isleap NN last JJ year NN prey NN month NN . SENT if IN months NNS 0 CD Borrow NP from IN the DT previous JJ year NN years NNS . SENT months NNS 12 CD . SENT Return VV a DT date NN object NN with IN the DT interval NN if IN order NN 1 CD return NN Date NN months NNS , , days NNS , , years NNS . SENT else RB return VV Date NN months NNS , , days NNS , , years NNS . SENT int NP Date NN . SENT . SENT compare VV const NN Date NN d SYM 2 CD const NN same JJ as IN in IN Listing VVG 2 CD End NN of IN File NP Listing VVG 8 CD Subtracts VVZ two CD dates NNS tdate NN 6 CD . SENT cpp NP . SENT include VV stdio NN . SENT h NN include VVP date NN 6 CD . SENT h NN main JJ Date NN d SYM 1 CD 1 CD , , 1 CD , , 1970 CD , , d NN 2 CD 12 CD , , 8 CD , , 1992 CD . SENT Date NN result NN d SYM 1 CD d NN 2 CD . SENT printf NN years NNS . SENT d SYM , , months NNS . SENT d SYM , , days NNS . SENT d SYM n NN , , result NN . SENT get VV year NN , , result NN . SENT get VV month NN , , result NN . SENT get VV day NN . SENT result NN d SYM 2 CD d NN 1 CD . SENT printf NN years NNS . SENT d SYM , , months NNS . SENT d SYM , , days NNS . SENT d SYM n NN , , result NN . SENT get VV year NN , , result NN . SENT get VV month NN , , result NN . SENT get VV day NN . SENT int NP test NN d SYM 1 CD d NN 2 CD d SYM 2 CD d NN 1 CD . SENT printf NN d SYM 1 CD d NN 2 CD d SYM 2 CD d NN 1 CD . SENT s PP n NN , , test NN . SENT yes UH . SENT no UH . SENT return NN 0 CD . SENT OUTPUT NN years NNS . SENT 22 CD , , months NNS . SENT 11 CD , , days NNS . SENT 7 CD years NNS . SENT 22 CD , , months NNS . SENT 11 CD , , days NNS . SENT 7 CD d SYM 1 CD d NN 2 CD d SYM 2 CD d NN 1 LS . SENT yes UH End NN of IN File NP Listing VVG 9 CD Adds VVZ stream NN I NN O NN to TO the DT Date NN class NN date NN 7 CD . SENT h NN class NN ostream NN . SENT class NN Date NN int NP month NN . SENT int NP day NN . SENT int NP year NN . SENT public JJ . SENT Constructors NNS Date VVP month NN day NN year NN 0 CD . SENT Date NN int NP m NN , , int NP d SYM , , int NP y NP month NN m NN . SENT day NN d SYM . SENT year NN y NN . SENT Accessor NP Functions NNS int NP get VV month NN const NN return NN month NN . SENT int NP get VVP day NN const NN return NN day NN . SENT int NP get VVP year NN const NN return NN year NN . SENT Date NN operator NN const NN Date NN d SYM 2 CD const NN . SENT Date NN operator NN month NN month NN . SENT day NN day NN . SENT year NN year NN . SENT return VV this DT . SENT int NP compare VVP const JJ Date NN const NN . SENT Relational NP operators NNS int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN . SENT const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD . SENT 0 CD I NN O NN operators NNS friend NN ostream NN operator NN ostream NN , , const NN Date NN . SENT friend NN istream NN operator NN istream NN , , Date NN . SENT . SENT End NN of IN File NP Listing VVG 10 CD Implements VVZ Date NN stream NN I NN O NN functions NNS include VVP iostream NN . SENT h NN include VVP date NN 7 CD . SENT h NN ostream NN operator NN ostream NN os NN , , const NN Date NN d SYM os NN d NN . SENT month NN d SYM . SENT day NN d SYM . SENT year NN . SENT return NN os NN . SENT istream NN operator NN istream NN is VBZ , , Date NN d SYM char NN slash NN . SENT is VBZ d NN . SENT month NN slash NN d SYM . SENT day NN slash NN d SYM . SENT year NN . SENT return NN is VBZ . SENT End NN of IN File NP Listing VVG 11 CD Illustrates VVZ stream NN I NN O NN of IN Date NN objects NNS tdate NN 7 CD . SENT cpp NP . SENT include VV iostream NN . SENT h NN include VVP date NN 7 CD . SENT h NN main JJ Date NN d SYM 1 CD , , d NN 2 CD . SENT cout NP Enter NP a DT date NN . SENT . SENT cin NN d SYM 1 CD . SENT cout NP Enter NP another DT date NN . SENT . SENT cin NN d SYM 2 CD . SENT cout NN d SYM 1 CD d NN 2 CD d SYM 1 CD d NN 2 CD endl NN . SENT cout NN d SYM 2 CD d NN 1 CD d SYM 2 CD d NN 1 CD endl NN . SENT return NN 0 CD . SENT OUTPUT NN Enter NP a DT date NN . SENT 10 CD 1 CD 1951 CD Enter NP another DT date NN . SENT 5 LS 1 CD 1954 CD d SYM 1 CD d NN 2 LS 7 CD 0 CD 2 CD d SYM 2 CD d NN 1 CD 7 CD 0 CD 2 CD End NN of IN File NP Listing VVG 12 CD Defines VVZ static JJ members NNS date NN 8 CD . SENT h NN Forward NP declarations NNS class NN istream NN . SENT class NN ostream NN . SENT class NN Date NN int NP month NN . SENT int NP day NN . SENT int NP year NN . SENT static JJ int NP dtab NP 2 CD 13 CD . SENT public JJ . SENT Constructors NNS Date VVP . SENT Get VV today's NNS date NN see VVP . SENT cpp NP file NN Date NN int NP m NN , , int NP d SYM , , int NP y NP month NN m NN . SENT day NN d SYM . SENT year NN y NN . SENT Accessor NP Functions NNS int NP get VV month NN const NN return NN month NN . SENT int NP get VVP day NN const NN return NN day NN . SENT int NP get VVP year NN const NN return NN year NN . SENT Date NN operator NN const NN Date NN d SYM 2 CD const NN . SENT Date NN operator NN month NN month NN . SENT day NN day NN . SENT year NN year NN . SENT return VV this DT . SENT int NP compare VVP const JJ Date NN const NN . SENT Relational NP operators NNS int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD 0 CD . SENT int NP operator NN . SENT const NN Date NN d SYM 2 CD const NN return NN compare NN d SYM 2 CD . SENT 0 CD . SENT Stream NP I NP O NP operators NNS friend NN ostream NN operator NN ostream NN , , const NN Date NN . SENT friend NN istream NN operator NN istream NN , , Date NN . SENT static JJ int NP isleap NN int NP y NP return NN y NP 4 CD 0 CD y NN 100 CD . SENT 0 CD y NN 400 CD 0 CD . SENT . SENT End NN of IN File NP Listing VVG 13 CD Final JJ implementation NN of IN the DT Date NN class NN date NN 8 CD . SENT cpp NNS include VVP iostream NN . SENT h NN include VVP time NN . SENT h NN include VVP assert VV . SENT h NN include VVP date NN 8 CD . SENT h NN Must MD initialize VV statics NNS outside IN the DT class NN definition NN int NP Date NN . SENT . SENT dtab NP 2 CD 13 CD 0 CD , , 31 CD , , 28 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 0 CD , , 31 CD , , 29 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD , , 31 CD , , 30 CD , , 31 CD , , 30 CD , , 31 CD . SENT Date NN Date NN . SENT . SENT operator NN const NN Date NN d SYM 2 CD const JJ int NP months NNS , , days NNS , , years NNS , , prev NP month NN , , order NN . SENT const NN Date NN first JJ , , last JJ . SENT Must MD know VV which WDT date NN is VBZ first JJ if IN compare VVP d NN 2 CD 0 CD this NN d SYM 2 CD order NN 1 CD . SENT first RB this DT . SENT last NN d SYM 2 CD . SENT else JJ order NN 1 CD . SENT first NN d SYM 2 CD . SENT last JJ this NN . SENT Compute VV the DT interval NN . SENT first JJ last JJ years NNS last JJ year NN first JJ year NN . SENT months NNS last JJ month NN first JJ month NN . SENT days NNS last JJ day NN first JJ day NN . SENT assert VV years NNS 0 CD months NNS 0 CD days NNS 0 CD . SENT Do VV obvious JJ corrections NNS days NNS before IN months NNS . SENT This DT is VBZ a DT loop NN in IN case NN the DT previous JJ month NN is VBZ February NP , , and CC days NNS 28 CD . SENT prev NP month NN last JJ month NN 1 CD . SENT while IN days NNS 0 CD Borrow NP from IN the DT previous JJ month NN if IN prev NP month NN 0 CD prev NP month NN 12 CD . SENT months NNS . SENT days NNS dtab NN isleap NN last JJ year NN prev NP month NN . SENT if IN months NNS 0 CD Borrow NP from IN the DT previous JJ year NN years NNS . SENT months NNS 12 CD . SENT Return VV a DT date NN object NN with IN the DT interval NN if IN order NN 1 CD return NN Date NN months NNS , , days NNS , , years NNS . SENT else RB return VV Date NN months NNS , , days NNS , , years NNS . SENT int NP Date NN . SENT . SENT compare VV const NN Date NN d SYM 2 CD const JJ int NP months NNS , , days NNS , , years NNS , , order NN . SENT years NNS year NN d NN 2 CD . SENT year NN . SENT months NNS month NN d NN 2 CD . SENT month NN . SENT days NNS day NN d NN 2 CD . SENT day NN . SENT return NN 0 CD , , 0 CD , , or CC 0 CD , , like IN strcmp NN if IN years NNS 0 CD months NNS 0 CD days NNS 0 CD return NN 0 CD . SENT else RB if IN years NNS 0 CD months NNS 0 CD return NN days NNS . SENT else RB if IN years NNS 0 CD return NN months NNS . SENT else RB return NN years NNS . SENT ostream NN operator NN ostream NN os NN , , const NN Date NN d SYM os NN d NN . SENT month NN d SYM . SENT day NN d SYM . SENT year NN . SENT return NN os NN . SENT istream NN operator NN istream NN is VBZ , , Date NN d SYM char NN slash NN . SENT is VBZ d NN . SENT month NN slash NN d SYM . SENT day NN slash NN d SYM . SENT year NN . SENT return NN is VBZ . SENT Date NN . SENT . SENT Date NN Get VVP today's JJ date NN time NN t NN tval NN time NN 0 CD . SENT struct NN tm NN tmp NN localtime NN tval NN . SENT month NN tmp NN tm NN mon NP 1 CD . SENT day NN tmp NN tm NN mday NN . SENT year NN tmp NN tm NN year NN 1900 CD . SENT End NN of IN File NP Listing VVG 14 CD Gets VVZ today's JJ date NN tdate NN 8 CD . SENT cpp NP . SENT include VV iostream NN . SENT h NN include VVP date NN 8 CD . SENT h NN main JJ Date NN today NN , , d NN 2 CD . SENT cout NP Today's NP date NN is VBZ today NN endl NN . SENT cout NP Enter NP another DT date NN . SENT . SENT cin NN d SYM 2 CD . SENT cout NN today NN d SYM 2 CD today NN d SYM 2 CD endl NN . SENT cout NN d SYM 2 CD today NN d SYM 2 CD today NN endl NN . SENT return NN 0 CD . SENT OUTPUT NN Today's NP date NN is VBZ 12 CD 12 CD 1992 CD Enter NP another DT date NN . SENT 1 LS 1 CD 1970 CD today NN d SYM 2 CD 11 CD 11 CD 22 CD d SYM 2 CD today NN 11 CD 11 CD 22 CD End NN of IN File NP