Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Clone the repository: https://github.com/hugonzb/DateFormat-Validator.git

Compile: javac ManyDates.java
run: java ManyDates

After running, type input and press enter for each new line required. When all input has been typed, press ctrl-d (when on windows terminal or drjava) or ctrl-z (when on MacOS) to submit the input.

Example Test cases:

1999/02/05
2005/20/30
02/02/02
01/01/01
20/2009/5
30/10/50

29/12/99
60/3/5
5/3/60
023/12/1999
023/012/1999
23/12/01999
23/12/999
23/12/1999

02/02/02
09/09/09
12/12/12

9/9/99
9/9/99
1999/9/9
19/19/1999
05/05/3100
02/02/1735
/ / /

About

A Java program takes multiple variations of dates as input and chooses the most probable date format as the valid one. It then rechecks all the input dates and returns and specifies the dates that are in the correct and incorrect format. This was a pair etude in COSC326, but can be used as a general function for validating a collection of dates.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages