Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % '2011-04-05' to date(2011, 4, 5)
- atom_to_date(Atom, date(Year, Month, Day)):-
- atom_codes(Atom, [Y1, Y2, Y3, Y4, 45, M1, M2, 45, D1, D2]),
- number_codes(Year, [Y1, Y2, Y3, Y4]),
- (M1 = 48 -> number_codes(Month, [M2]) ; number_codes(Month, [M1, M2])),
- (D1 = 48 -> number_codes(Day, [D2]) ; number_codes(Month, [D1, D2])).
Add Comment
Please, Sign In to add comment