Skip to content

Instantly share code, notes, and snippets.

var isWorkingDay = (year, month ,day, holidays) => (
moment([year, month, day]).isValid() &&
moment([year, month, day]).day() >= 1 &&
moment([year, month, day]).day() <= 5 &&
!holidays.includes(day)
)
var getWorkingDays = (targetYear, targetMonth, startDay, holidays) => {
let workingDays = []
for(let i = startDay; i <= 31; i++) {
@nobuhikosawai
nobuhikosawai / train.ino
Created August 24, 2019 09:01
鉄道模型。ポインタ付き
void setup(){
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(12, INPUT);
pinMode(13, INPUT);
}
void loop(){
int blueButtonState = digitalRead(2);
int redButtonState = digitalRead(3);