FOSS Sunday Update - August 2021
This is the first log of my open source contributions. Created for myself, somewhat inspired by the paper “The Errors of TeX” by Donald Knuth.
Not much to report here. For my own little TypeScript project picofp there is a dependabot alert that I’ve just not gotten to yet.
Started a new project that should become public as soon as I get a MVP going.
I started working on two bugs to ease myself into firefox development again and make sure I remember the old stuff and learn the new ways of working.
A bug concerning the timezone offset in date parsing. Firefox allows four digits for the timezone offset. Either with a
: character between the second and the third number of just straight four numbers. We also allow dates to separate the date and the time part with a
That means we supported dates like:
2016-12-29 08:30:14-0700 2016-12-29 08:30:14-07:00
What we didn’t support were dates on the form
2016-12-29 08:30:14-07 where the timezone offset is just two digits. This is something both chrome and edge supports which makes it a good target for compatibility. Another wrinkle in the bug is that they only allow this for when the supplied date have exchanged the
T character with a
Link to the diff in the date parser: https://hg.mozilla.org/mozilla-central/diff/042937e67e03b88d80ff764cb10df041820e7855/js/src/jsdate.cpp
Another date parsing bug. This time we are not spec compliant. The spec says that we are allowed to represent years in an expanded format with six digits, this is in order to be able to represent the full range of years allowed in the spec (plus minus 273,790 years from the UNIX epoch). Expanded years are always prefixed with either
- and the year
000000 is always positive and must therefore be written as
+000000. We allowed the date
-000000 which is not spec compliant.
This was also an easy change. Make sure that if we have seen an
- and the year is 0 then we simply return NaN (signifying an invalid date).
At the time of writing this change has not been reviewed or merged.
I’ve wanted to get into working on some web specifications and did a small little change in the WHATWG Streams standard (https://github.com/whatwg/streams). Barely worth mentioning given that it was mostly a “get to know how to contribute” to the specs and all that goes around it. There was an argument in the specification to a function that was not needed and not used anywhere.