Skip to content

Tag Archives: date-time-program

The class Date represents a specific instant in time, with millisecond precision. The Date class of java.util package implements Serializable, Cloneable and Comparable interface. It… Read More
Prerequisite : Find day of the week for given dateProblem: To print the calendar of any given year. The program should be such that it… Read More
Given an array of dates, how to sort them. Example: Input: Date arr[] = {{20, 1, 2014}, {25, 3, 2010}, { 3, 12, 1676}, {18,… Read More
C // C++ program for sorting dates using selection sort #include<bits/stdc++.h> using namespace std; struct date {     int day;     int month;     int year; };  … Read More
Given two dates, find total number of days between them. The count of days must be calculated in O(1) time and O(1) auxiliary space.  Examples: … Read More
A year is a leap year if the following conditions are satisfied:  The year is multiple of 400. The year is multiple of 4 and… Read More
Write a function that calculates the day of the week for any particular date in the past or future. A typical application is to calculate… Read More

Start Your Coding Journey Now!