Write a program to display the current date and time in the following format:

Today is Thursday, March 18, 2021
The current time is 2:07 p.m.

The user of the program does not make any inputs. The program reads its "inputs" from the system clock, using a special module described below.

In addition to the main module, your program must include the following modules (you cannot change the specified module name or parameter list the number of parameters, the type of each parameter, or their order for any of these modules):

get_datetime( out year As Integer, out month As Integer, out day As Integer, out hour As Integer, out minute As Integer )

An input module that obtains the current date and time components from the system clock. The year is a four-digit integer accurate for years since 1900, the month an integer from 1 to 12, the day an integer from 1 to 31, the hour an integer from 0 to 23, and the minute an integer from 0 to 59. (Note: A full implementation of this module is provided in the datetime.cpp starter file; you are not responsible for understanding the details of how this module works, as it depends on concepts introduced in CISP 360.)

compute_jdn( in year As Integer, in month As Integer, in day As Integer, out jdn As Integer )

A processing module that computes the JDN for the given date, as in Lab #3.

compute_dow( in year As Integer, in month As Integer, in day As Integer, out dow As Integer )

A processing module that computes the weekday number for the given date, as in Lab #4.

get_month_name( in month As Integer, out month_name As String )

A processing module that determines the month name corresponding to the given month number.

get_weekday_name( in dow As Integer, out weekday_name As String )

A processing module that determines the weekday name corresponding to the given weekday number (where zero is "Sunday", 1 is "Monday", etc.).

display_date( in year As Integer, in month As Integer, in day As Integer )

An output module that displays a date on the screen given the component year, month, and day numbers e.g., Thursday, March 18, 2021 . (Note: Due to the logic involved, this module would normally be implemented as a processing module that produces a string. Concatenation of strings and numbers in C++ requires knowledge of "string streams", which are out of scope for CISP 301. Including the necessary logic in this output module to send results to the screen is a reasonable compromise, as the code could then easily be transformed into a processing module that uses a string stream instead of the std::cout stream.)

display_time( in hour As Integer, in minute As Integer )

An output/controller module that displays a time on the screen in 12-hour format given the component hour and minute numbers in 24-hour format. This is accomplished by calling upon the services of the display_hour , display_minute and display_ampm modules described below. Five minutes after midnight (hour=0, minute=5) shows 12:05 a.m. Two-thirty in the afternoon (hour=14, minute=30) shows 2:30 p.m. (As with the previous module, this module and those it calls would be better implemented as processing modules that produce strings.)

display_hour( in hour As Integer )

An output module that displays the hour on the screen in 12-hour format given an hour in 24-hour format.

display_minute( in minute As Integer )

An output module that displays the given minute on the screen. Minutes are displayed with a leading zero when less than ten.

display_ampm( in hour As Integer )

An output module that displays "a.m." or p.m. on the screen given an hour in 24-hour format.

Each of these modules may only be called once in your program, and you may not add additional modules. The datetime.cpp starter file (http://cis.scc.losrios.edu/~krofb/cisp301/labs/lab06-code/) contains declaration prototypes for these modules, along with finished implementations of the main and get_datetime modules. Use this file as a starting point, and add your code to it, but do not change any of the Lines 1- 71 (except to add your name and section number on Lines 2 and 4). Any changes made to Lines 171 will be discarded when your program is graded, and may prevent your code from compiling.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.