diff --git a/module3/ressources/iso_date_format.md b/module3/ressources/iso_date_format.md new file mode 100644 index 0000000000000000000000000000000000000000..03d3521a6fe3e5fb0187a747a74a1170745d2583 --- /dev/null +++ b/module3/ressources/iso_date_format.md @@ -0,0 +1,10 @@ +--- +TITLE: The ISO date format +Date: Fri Mar 8 09:33:11 2019 +--- + +[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) specifies the digital representation of date and time. For dates, which are of interest to us here, there are two different ways of proceeding: we can give the year, the month, and the day of the month, or we can give the year, the week, and the day of the week. August 8, 2018 can therefore be written `2018-08-08` or `2018-W32-3`, as it is the third day (Wednesday) of week 32 of 2018. + +The definition of the week number requires some thought, as January 1st rarely falls on a Monday. What week is the first week of the year? The answer given by ISO 8601 is: the one that has more than half of its days in the new year, which is equivalent to the one that contains the first Thursday of the year. Consequently, it is quite possible, even frequent, that the first day of the first week of year *N* is in year *N-1*. To designate a whole week, we simply do not provide the day. + +The Sentinel Network uses this definition of the week number, but does not respect the precise representation provided by ISO 8601. Instead of writing the third week of 1995 as `1995-W03`, it uses `199503`. diff --git a/module3/ressources/iso_date_format_fr.md b/module3/ressources/iso_date_format_fr.md new file mode 100644 index 0000000000000000000000000000000000000000..afeec9f84e1d6c601ec79e699deae4a7b62cc59c --- /dev/null +++ b/module3/ressources/iso_date_format_fr.md @@ -0,0 +1,10 @@ +--- +TITLE: Le format ISO pour les dates +Date: Fri Mar 8 09:33:11 2019 +--- + +La norme [ISO 8601](https://fr.wikipedia.org/wiki/ISO_8601) spécifie la représentation numérique de la date et de l'heure. Pour la date, qui nous intéresse ici, il y a deux façons différentes de procéder : on peut donner l'année, le mois, et le jour du mois, ou on peut donner l'année, la semaine, et le jour de la semaine. Le 8 août 2018 peut donc être écrit `2018-08-08` ou `2018-W32-3`, car il s'agit du troisième jour (mercredi) de la semaine 32 de l'année 2018. + +La définition du numéro de la semaine nécessite un peu de réflexion, car le 1er janvier ne tombe que rarement sur un lundi. Quelle semaine est donc la première de l'année ? La réponse de la norme ISO 8601 est : celle qui a plus de la moitié de ses jours dans la nouvelle année, ce qui est équivalent à dire celle qui contient le premier jeudi de l'année. Par conséquent, il est tout à fait possible, même fréquent, que le 1er jour de la première semaine de l'année *N* tombe dans l'année *N-1*. Pour désigner une semaine entière, on ne fournit simplement pas le jour. + +Le Réseau Sentinelles reprend cette définition du numéro de semaine, mais ne respecte pas la représentation précise prévue par la norme ISO 8601. Au lieu d'écrire la troisième semaine de 1995 comme `1995-W03`, il écrit `199503`.