-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
42 lines (30 loc) · 1.41 KB
/
README
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
32
33
34
35
36
37
38
39
40
41
42
Two files so far:
Sample file to parse (datesentences.txt)
Sample parsed file (answers.txt)
Write code that will take the raw file and generate the parsed file.
The program should extract just the date info, convert it to RFC3339 format.
If it can't find any date, or can't parse it correctly, just print
"None" so that the automatic answer checking using 'diff' will be
easier to analyze). If there are n-many lines in the input, there
should be n-many lines in the output.
If just the date is found, produce something like this:
Whatever stuff was before the date|1999-12-31|whatever stuff was after the date
If just the date and time are found, produce something like this:
Whatever stuff was before the date|1999-12-31T23:59|whatever stuff was after the date.
If the date, time, and timezone were found, produce something something like this:
Whatever stuff was before the date|1999-12-31T23:59:59-0800|whatever stuff was after the date.
The dates that are in the sample file will have no dates before January 1, 1970.
If you see a string like Saturday, November 12, you can assume that
the string "Saturday" is part of the date specification and not part
of the non-date information.
There are no numbers other than dates. The only numbers that are in
use are Arabic numerals (no Roman numerals, no Chinese numerals).
Here are the locales that are in use in the datesentences:
en_US
en_GB
it_IT
es_ES
ru_RU
de_DE
fr_FR
ja_JP