Package com.acelet.s.task

Source Code of com.acelet.s.task.GoodfridayHolidaying

/* Copyright 1999-2008 Acelet.org. All rights reserved. GPL v2 license */
/** @author Wei Jiang */

package com.acelet.s.task;

import java.io.*;
import java.util.*;

import com.acelet.lib.Common;
import com.acelet.lib.Luner;
import com.acelet.lib.Phrase;

public class GoodfridayHolidaying implements Holidaying {
  public long getTheHoliday(int year) {
    long nextFullMoon = new Luner().nextFullMoon(year + "-" + "03" + "-" + 21);
    GregorianCalendar calendar = new GregorianCalendar();
    calendar.setTime(new Date(nextFullMoon));
    calendar.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
    return calendar.getTime().getTime();
  }
}
TOP

Related Classes of com.acelet.s.task.GoodfridayHolidaying

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.