Koj tuaj yeem paub hnub twg ntawm lub limtiam twg hnub tshwj xeeb poob rau yav dhau los, tam sim no lossis yav tom ntej siv cov keeb kwm hu ua perpetual calendar. Koj tuaj yeem ua cov twj zoo li no nyob hauv tsev.
Cov Lus Qhia
Kauj ruam 1
Ua xya daim npav caij nyoog rau ib hlis, hauv thawj ntawm uas lub hli pib hnub Monday, nyob rau hauv ob hnub Tuesday, nyob rau hauv peb los ntawm hnub Wednesday, thiab ntxiv mus kom txog thaum daim ntawv qhia hnub uas lub hli pib hnub Sunday. Muab cov lej ntawm 1 txog 7 rau cov npav, thiab cob tus lej thawj rau hauv daim ntawv qhia hnub uas lub hli pib hnub Monday. Ua cov npav no tawm ntawm cov duab los qhia hnyav thiab laminate rau lawv, vim daim calendar tau tsim los khaws cia thiab siv ntau xyoo.
Kauj ruam 2
Tsis tas li ntawd suav nrog hauv cov txheej txheem ntawm daim ntawv qhia hnub perpetual daim npav nrog cov qauv hauv qab no: h = d + ((13m-1) / 5) + r + (y / 4) + (v / 4) -2v, qhov twg: - h yog cov txiaj ntsig hauv nruab nrab los hloov mus ntxiv; - hnub - hnub; - m - hli, xaiv nyob rau hauv ib qho kev txawv txawv: Lub Peb Hlis - thawj lub hli, Lub ob hlis ntuj - kaum ob; - d - ob kawg ntawm tus lej xyoo (yog tias lub hlis yog Lub Ib Hlis lossis Lub Ob Hlis, tom qab ntawd xyoo dhau los); - hauv - cov lej xyoo dhau los uas tau rho ntu (rau Lub Ib Hlis lossis Lub Ob Hlis, rho 2 tsis suav nrog 1). Daim npav no tseem ua cov tuab tuab duab los qhia thiab lamination. Staple txhua daim npav ua ke kom lawv tsis poob. Ua ib rooj plaub yooj yim rau daim ntawv thov caij nyoog, yog tias koj xav tau, khaws lub laij lej ntawm qhov tsim nyog loj hauv nws.
Kauj ruam 3
Tom qab ua kev suav teb raws li cov qauv qhia, faib qhov tshwm sim ntawm h yog xya nrog seem uas seem.
Kauj ruam 4
Nqa cov qauv tawm ntawm qhov seem seem.
Kauj ruam 5
Nqa daim npav nrog tus lej sib npaug ntawm cov txiaj ntsig ntawm kev suav zaum kawg, thiab tom qab ntawd siv nws los txiav txim rau hnub ntawm lub limtiam.
Kauj Ruam 6
Nyob ntawm yeem, sau ib qho kev pab cuam los ua cov kev suav rau ob qho qauv hauv ib hom lus programming uas koj paub. Hauv qhov no, txawm li cas los xij, kev faib nrog cov seem tuaj yeem nyuaj, vim tias tsis muaj ib qho haujlwm tau npaj rau qhov no hauv feem ntau ntawm cov lus programming. Nws yog qhov yooj yim tshaj plaws los siv cov lus Pascal, uas qhov ua haujlwm sib txuas tau muaj. Txhawm rau nrhiav cov zauv seem ntawm qhov tshwm sim ntawm kev faib nrog cov seem, siv ib txoj kab ntawm daim ntawv hauv qab no: c: = a div b. Los nrhiav cov seem sib faib, siv kab ntawm lwm daim ntawv: c: = a mod b.