Java Calendar Day isSunday(GregorianCalendar date)

Here you can find the source of isSunday(GregorianCalendar date)

Description

is Sunday

License

Apache License

Declaration

public static boolean isSunday(GregorianCalendar date) 

Method Source Code

//package com.java2s;
/**/*from  ww  w .  j  ava 2s.  c  o  m*/
 * Copyright 2007 Slawomir Wojcicki
 * <p/>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p/>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p/>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import java.util.Calendar;

import java.util.GregorianCalendar;

public class Main {
    public static boolean isSunday(GregorianCalendar date) {
        return date.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY;
    }
}

Related

  1. isSameDay(Calendar day1, Calendar day2)
  2. isSameDay(Calendar dayOne, Calendar dayTwo)
  3. isSameDay(Calendar today, Date now)
  4. isSameDay(final Calendar cal1, final Calendar cal2)
  5. isSameDay(final Calendar date1, final Calendar date2)
  6. isTheSameDay(Calendar dayOne, Calendar dayTwo)
  7. isToday(Calendar creationDate)
  8. isToday(Calendar date)
  9. isToday(Calendar now, Calendar then)