Cycymomo
8/23/2013 - 4:09 PM

140bytes - calendrier perpétuel (perpetual calendar) http://www.developpez.net/forums/d1362763/webmasters-developpement-web/javascript/l

// Result :
[Array[31], Array[29], Array[31], Array[30], Array[31], Array[30], Array[31], Array[31], Array[30], Array[31], Array[30], Array[31]]
// Example 1st Array : january
0: "samedi"
1: "dimanche"
2: "lundi"
3: "mardi"
4: "mercredi"
5: "jeudi"
6: "vendredi"
7: "samedi"
8: "dimanche"
9: "lundi"
10: "mardi"
11: "mercredi"
12: "jeudi"
13: "vendredi"
14: "samedi"
15: "dimanche"
16: "lundi"
17: "mardi"
18: "mercredi"
19: "jeudi"
20: "vendredi"
21: "samedi"
22: "dimanche"
23: "lundi"
24: "mardi"
25: "mercredi"
26: "jeudi"
27: "vendredi"
28: "samedi"
29: "dimanche"
30: "lundi"
length: 31
// 140bytes - http://www.developpez.net/forums/d1362763/webmasters-developpement-web/javascript/ludique-defis-code-en-tweet/
(function(y,t,r,i,d,j,s){
for(r=i=[];i<12;r[i++]=s)for(j=s=[];+d!=+new Date(y,i+1,0);s[j++]=t[d.getDay()])d=new Date(y,i,j+1);return r
})(2000,['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi']);
// 140bytes - http://www.developpez.net/forums/d1362763/webmasters-developpement-web/javascript/ludique-defis-code-en-tweet/
(function(y,t,r,i,d,j,s){
for(r=i=[];i<12;r[i++]=s)for(j=s=[];+d!=+new Date(y,i+1,0);s[j++]=t[(y%100*1.25+'0642'[(y/100-15)%4^0]*1+'033614625035'[d.getMonth()]*1+d.getDate()-!!((!(y%4)&&y%100)||!(y%400)))%7^0])d=new Date(y,i,j+1);return r
})(2000,['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi']);