From 01e863bab8402e78cb694abf19b2a632636ed5e0 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 3 Oct 2021 21:48:29 +0200 Subject: Strip leading 0s from year --- challenge-132/abigail/bash/ch-1.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-132/abigail/bash/ch-1.sh b/challenge-132/abigail/bash/ch-1.sh index 5ea6e68cd3..eb99113be0 100644 --- a/challenge-132/abigail/bash/ch-1.sh +++ b/challenge-132/abigail/bash/ch-1.sh @@ -33,7 +33,7 @@ function j2g () { g2j 2021 9 22; julian_today=$J while read y m d -do g2j $y ${m/#0/} ${d/#0/}; julian_then=$J +do g2j ${y/#0/} ${m/#0/} ${d/#0/}; julian_then=$J j2g $(( 2 * julian_then - julian_today )) printf "%04d/%02d/%02d, " $Y $M $D j2g $(( 2 * julian_today - julian_then )) -- cgit From f90001638d889f94b68fa2679aea896b6b855ed8 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 3 Oct 2021 21:49:33 +0200 Subject: Remove unused code --- challenge-132/abigail/node/ch-1.js | 2 -- challenge-132/abigail/python/ch-1.py | 8 -------- 2 files changed, 10 deletions(-) diff --git a/challenge-132/abigail/node/ch-1.js b/challenge-132/abigail/node/ch-1.js index e7f937e4b3..69f4a996b9 100644 --- a/challenge-132/abigail/node/ch-1.js +++ b/challenge-132/abigail/node/ch-1.js @@ -8,8 +8,6 @@ // Run as: node ch-1.js < input-file // -const util = require ('util') - function int (x) { if (x < 0) { return Math . ceil (x) diff --git a/challenge-132/abigail/python/ch-1.py b/challenge-132/abigail/python/ch-1.py index 0f70d519e4..e8f339af2b 100644 --- a/challenge-132/abigail/python/ch-1.py +++ b/challenge-132/abigail/python/ch-1.py @@ -8,16 +8,8 @@ # Run as: python ch-1.py < input-file # -import math import fileinput -def _int (x): - if x < 0: - return math . ceil (x) - else: - return math . floor (x) - - def g2j (Y, M, D): return (int ((1461 * (Y + 4800 + int ((M - 14) / 12))) / 4) + int ((367 * (M - 2 - 12 * int ((M - 14) / 12))) / 12) - -- cgit From 1944329834a0636ecfc6ba171381d79d593867b4 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 3 Oct 2021 21:50:23 +0200 Subject: Link to blog --- challenge-132/abigail/blog.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 challenge-132/abigail/blog.txt diff --git a/challenge-132/abigail/blog.txt b/challenge-132/abigail/blog.txt new file mode 100644 index 0000000000..5e79dc06ef --- /dev/null +++ b/challenge-132/abigail/blog.txt @@ -0,0 +1 @@ +https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-132-1.html -- cgit From cfab1b9ffffcba3626e608a2238d1473ac980759 Mon Sep 17 00:00:00 2001 From: Abigail Date: Mon, 4 Oct 2021 00:43:08 +0200 Subject: Link to second blog of week 132 --- challenge-132/abigail/blog2.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 challenge-132/abigail/blog2.txt diff --git a/challenge-132/abigail/blog2.txt b/challenge-132/abigail/blog2.txt new file mode 100644 index 0000000000..9593e5f199 --- /dev/null +++ b/challenge-132/abigail/blog2.txt @@ -0,0 +1 @@ +https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-132-2.html -- cgit