ocaml / ood

OCaml.org v3 data repository
Other
14 stars 8 forks source link

Uniform date representation #82

Open patricoferris opened 2 years ago

patricoferris commented 2 years ago

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:

What do you think @tmattio ?

tmattio commented 2 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.

patricoferris commented 2 years ago

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
tmattio commented 2 years ago

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.