git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272436 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -87,7 +87,7 @@ public class ServerDeploy extends Task | |||||
| /////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////// | ||||
| // | // | ||||
| // Place vendor specific tool creations here. | |||||
| // Place vendor specific tool creations here. | |||||
| // | // | ||||
| /////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////// | ||||
| @@ -127,7 +127,7 @@ public class ServerDeploy extends Task | |||||
| /////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////// | ||||
| // | // | ||||
| // Execute method | |||||
| // Execute method | |||||
| // | // | ||||
| /////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////// | ||||
| @@ -150,7 +150,7 @@ public class ServerDeploy extends Task | |||||
| /////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////// | ||||
| // | // | ||||
| // Set/get methods | |||||
| // Set/get methods | |||||
| // | // | ||||
| /////////////////////////////////////////////////////////////////////////// | /////////////////////////////////////////////////////////////////////////// | ||||
| @@ -1,7 +1,7 @@ | |||||
| /* | /* | ||||
| * The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
| * | * | ||||
| * Copyright (c) 2000-2001 The Apache Software Foundation. All rights | |||||
| * Copyright (c) 2000-2002 The Apache Software Foundation. All rights | |||||
| * reserved. | * reserved. | ||||
| * | * | ||||
| * Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
| @@ -130,7 +130,7 @@ public abstract class BaseTest { | |||||
| /** | /** | ||||
| * @return the destination directory as an absolute path if it exists | * @return the destination directory as an absolute path if it exists | ||||
| * otherwise return <tt>null</tt> | |||||
| * otherwise return <tt>null</tt> | |||||
| */ | */ | ||||
| public String getTodir(){ | public String getTodir(){ | ||||
| if (destDir != null){ | if (destDir != null){ | ||||
| @@ -190,13 +190,13 @@ public final class DateUtils { | |||||
| * moon period = 29.53058 days ~= 30, year = 365.2422 days | * moon period = 29.53058 days ~= 30, year = 365.2422 days | ||||
| * | * | ||||
| * days moon phase advances on first day of year compared to preceding year | * days moon phase advances on first day of year compared to preceding year | ||||
| * = 365.2422 - 12*29.53058 ~= 11 | |||||
| * = 365.2422 - 12*29.53058 ~= 11 | |||||
| * | * | ||||
| * years in Metonic cycle (time until same phases fall on the same days of | * years in Metonic cycle (time until same phases fall on the same days of | ||||
| * the month) = 18.6 ~= 19 | |||||
| * the month) = 18.6 ~= 19 | |||||
| * | * | ||||
| * moon phase on first day of year (epact) ~= (11*(year%19) + 18) % 30 | * moon phase on first day of year (epact) ~= (11*(year%19) + 18) % 30 | ||||
| * (18 as initial condition for 1900) | |||||
| * (18 as initial condition for 1900) | |||||
| * | * | ||||
| * current phase in days = first day phase + days elapsed in year | * current phase in days = first day phase + days elapsed in year | ||||
| * | * | ||||
| @@ -213,10 +213,10 @@ public final class DateUtils { | |||||
| public static int getPhaseOfMoon(Calendar cal) { | public static int getPhaseOfMoon(Calendar cal) { | ||||
| int dayOfTheYear = cal.get(Calendar.DAY_OF_YEAR); | int dayOfTheYear = cal.get(Calendar.DAY_OF_YEAR); | ||||
| int yearInMetonicCycle = ((cal.get(Calendar.YEAR) - 1900) % 19) + 1; | int yearInMetonicCycle = ((cal.get(Calendar.YEAR) - 1900) % 19) + 1; | ||||
| int epact = (11 * yearInMetonicCycle + 18) % 30; | |||||
| if ((epact == 25 && yearInMetonicCycle > 11) || epact == 24) { | |||||
| int epact = (11 * yearInMetonicCycle + 18) % 30; | |||||
| if ((epact == 25 && yearInMetonicCycle > 11) || epact == 24) { | |||||
| epact++; | epact++; | ||||
| } | } | ||||
| return (((((dayOfTheYear + epact) * 6) + 11) % 177) / 22) & 7; | |||||
| return (((((dayOfTheYear + epact) * 6) + 11) % 177) / 22) & 7; | |||||
| } | } | ||||
| } | } | ||||