I was able to glance the beta url from your post, so I tried it. Still don’t get the “extra stuff” under solar.
Any idea why not?
Regarding beta vs regular, currently I find:
- Regular:
14.0.1-2a7c646
- Beta:
13.0.1-a1b3320
So yes, it very much looks like “beta” is not really beta, at least not today. It runs a major version behind!
Regarding the labelling mishap… I found the Javascript code that does the formatting. It is, indeed, different between the beta version and the regular version (code has been “minified” so looks a little odd):
// In homebeta.sense.com code
function c(e, t) {
var n = i()(e).startOf("day"),
r = i()().startOf("day"),
a = i()().startOf("day").subtract(1, "days");
return n.isSame(r) ? "Today" : n.isSame(a) ? "Yesterday" : n.format(t)
}
// In home.sense.com code
function c(e, t) {
var n = (0, a.AH)(e, { startOf: "day" }),
i = (0, a.AH)(new Date, { startOf: "day" }),
o = (0, a.AH)(new Date, { startOf: "day", minus: { days: 1 } });
return (0, a.Xy)(n, i) ? r.ZP.t("today") : (0, a.Xy)(n, o) ? r.ZP.t("yesterday") : (0, a.S$)(e, t)
}
The equivalence between the two sections is variable “n” is the same in both, “r” is “i” in the second one, “a” is “o” in the second one. Computations for each are the same. “n” is the start of the day of some time passed in as “e”. “r” is the start of the day in the web browser’s current time, and “a” is the start of yesterday compared to the web browser’s current time.
Another big difference in the code, immaterial to this discussion, is that the “regular” version contains lots of code to make the site localizable, whereas the beta version does not. In general I am assuming that (0, a.AH)
is equivalent to the i()
method, and (0, a.Xy)
is equivalent to the isSame
method. r.ZP.t
looks up a translated string in a table.
With that said, it looks like the return expression in both is equivalent as far as “today” and “yesterday” is concerned. Yet we get different outcomes. The explanation might be that the value passed in “e” is different between the two versions. Another possible explanation is that the lookup table used by the regular version (for localization) has the wrong text associated with “today”, but from what I can tell this is not the case.
I also noticed that a very similar calculation is done elsewhere in the code, but using a completely different piece of code! This is true in both versions. In general this code does not strike me as high quality code…