Archive for calendar

platform fatigue

Posted in Kids, Linux, University life with tags , , , , , , , , , on March 1, 2021 by xi'an

With the myriad of platforms used to counteract the absence of most direct interactions at work, I start to suffer from platform fatigue, constantly switching to a different interface and wasting a lot of time on retrieving links from old emails and reentering passwords… Even a single platform like Teams requires permanent juggling between Dauphine and Warwick (obviously linked with Microsoft constraints), plus repeated updates that clash more often than enough with Firefox. Not to mention collaborative systems like Overleaf, Wikimath, Git, and others. Same thing for regular Zoom meetings which fail to reopen from one week to the next. And calendars that cannot keep track of everything or even anything! The only interface that keeps working (for me) across accounts is my Thunderbird email interface, except for the sharp increase in the email volume (and the fact that many now bypass emails for chats on Teams, Slack, and another myriad of platforms).

how many Friday 13th?

Posted in Books, Kids, R with tags , , , on December 18, 2020 by xi'an

A short Riddler’s riddle on the maximum number of Fridays 13th over a calendar year, of which I found 9 by a dumb exploration :

for(j in 0:(length(cy<-c(bi,oy,oy,oy))-1)){#any day in quartade
for(i in 0:6){

with no change whatsoever when starting another day of the year, including a Friday 13.(since this only gains 13 days!). An example of a quartade (!) with nine such days is the sequence 2012-2015 with 3+2+1+3 occurences….

a [Gregorian] calendar riddle

Posted in R with tags , , , , , on April 17, 2018 by xi'an

A simple riddle express this week on The Riddler, about finding the years between 2001 and 2099 with the most cases when day x month = year [all entries with two digits]. For instance, this works for 1 January, 2001 since 01=01 x 01. The only difficulty in writing an R code for this question is to figure out the number of days in a given month of a given year (in order to include leap years).

The solution was however quickly found on Stack Overflow and the resulting code is

#safer beta quantile
numOD <- function(date) {
    m <- format(date, format="%m")
    while (format(date, format="%m") == m) date <- date + 1
    return(as.integer(format(date - 1, format="%d")))
for (i in 2001:2099)
for (j in 2:11)

for (i in 1:99){
for (j in 1:12)
  if ((i==(i%/%j)*j)&((i%/%j)<=dayz[j,i])) 

The best year in this respect being 2024, with 7 occurrences of the year being the product of a month and a day…