Ignore empty lines or comments in vacation point file.

This commit is contained in:
2026-03-02 07:18:42 +01:00
parent d71abe29b0
commit 838069e1b9
2 changed files with 5 additions and 0 deletions

View File

@@ -82,6 +82,9 @@ public class PointEngine {
try (BufferedReader br = new BufferedReader(new FileReader(pointsFile))) { try (BufferedReader br = new BufferedReader(new FileReader(pointsFile))) {
String line; String line;
while ((line = br.readLine()) != null) { while ((line = br.readLine()) != null) {
if (line.isEmpty() || line.charAt(0) == '#')
continue;
Matcher defaultMatcher = defaultPattern.matcher(line); Matcher defaultMatcher = defaultPattern.matcher(line);
if (defaultMatcher.find()) { if (defaultMatcher.find()) {
defaultPoints = Double.parseDouble(defaultMatcher.group(1)); defaultPoints = Double.parseDouble(defaultMatcher.group(1));

View File

@@ -4,6 +4,8 @@ m=Jul 0.825
m=Aug 0.825 m=Aug 0.825
2026-12-24 0.5 2026-12-24 0.5
2026-12-31 0.5 2026-12-31 0.5
# Weekends & Holidays
dow=Sun 0.0 dow=Sun 0.0
dow=Sat 0.0 dow=Sat 0.0
2026-01-01 0.0 2026-01-01 0.0