© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
R. VystavělC# Programming for Absolute Beginnershttps://doi.org/10.1007/978-1-4842-7147-6_11

11. Calculations with Dates

Radek Vystavěl1  
(1)
Ondřejov, Czech Republic
 

In the previous chapter, you practiced calculations from the economic world. You will frequently need to do calculations with dates, too. Say you need to set the date when an invoice is due. Or say you want to calculate how many days an invoice is past due. Or, you might need to know the first and last days of a specific period like a month or a quarter. In this chapter, you’ll learn how to do calculations with dates.

Date Input

First, you will learn how to read a date from a user. I will show ...

Get C# Programming for Absolute Beginners: Learn to Think Like a Programmer and Start Writing Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.