Open patricoferris opened 3 years ago
Having a single format to represent the dates seems sensible. Filling 0 for the information that we don't have (be it the month, day, hour, etc.) also seems fine.
I would try to keep the initial creation date as well as the last update for all of the resources. I'm not sure if this will be useful, but it doesn't take much space. One possible use case would be to sort the videos by creation date.
Having two dates seems sensible, perhaps this could be the shared format:
module Date = struct
type t = {
created_at : string option;
updated_at : string option;
}
end
perhaps this could be the shared format
Intuitively, I would tend to keep them separate, we might want to keep the flexibility of having one, the other, or both, without having three different types.
Currently we have quite a few dates stored in the metadata, should we provide a better representation for these other than
string
or to keep things simple we could keep them as strings but ensure the strings are rfc3339 formatted?Some examples include:
year
in the watch.ocaml.org data could just be the actual retrieved value as these are already in the correct format.year
some of them we know months too we could convert to rfc3339 and always round to the earliest in the year (i.e. 1st day of the month, January, 00:00:00)What do you think @tmattio ?