Date Assignment
Date Assignment
3. Write a program to calculate age of son which is half the age of father who has seen 40 leap
years
5. Write a program to determine the birthdate of person whose age is in seconds is 3400secs
as of today?
6. Write a program to print date of the third Tuesday of a every month of given Year.
7. Write a program to convert given days, hours, minutes, seconds into DateTime.
Ex
Month (mm): 05
|Su Mo Tu We Th Fr Sa|
|--------------------|
| 1 2 3 4 5 6|
| 7 8 9 10 11 12 13|
|14 15 16 17 18 19 20|
|21 22 23 24 25 26 27|
|28 29 30 31 |
|--------------------|
10. Write a program to print dates in fibonacci series pattern from given date and n number.
Ex n=5
date='2021-09-15'
series is 0, 1, 1, 2, 3
ex Date1- 20-Apr-2019
Date2- 25-Apr-2019
20-Apr-19
21-Apr-19
22-Apr-19
23-Apr-19
24-Apr-19
25-Apr-19
12. Write a program to get the list of dates for the conditions below:
A. Suppose a person is born on 1st january 1992 which was a leap year and the day was
Wednesday.
B. So from 1992 to 2021, how many leap years were there?
C. Since 1992 to 2021, how many of the times it happened that the person’s birthday was on
Wednesday only?
D. Since 1992 to 2021, how many times did it happen that the person’s birthday in a leap
year was on Wednesday only?
You need to take input from user of his birthdate, and then calculate all the above values.
User can enter any date and the program should be able to give the outcome.
b. Create the above program for multiple countries, considering their timezones. (US, UK,
Chile, South Africa, Russia, Japan, Australia, etc...)
PLEASE NOTE THAT THE EXAMPLES SHARED WITH THE PROGRAMS ARE ONLY FOR YOUR
UNDERSTANDING, MAKE SURE YOU DO NOT USE THE SAME VALUES TO CREATE YOUR
PROGRAMS AND ALSO MAKE SURE THAT IN THE PROGRAMS WHERE YOU ARE ASKING OF
USER’S INPUT, THE PROGRAM SHOULD WORK FOR EACH AND EVERY INPUT VALUE
PROVIDED BY THE USER.