Android Day Get firstDay(Date date)

Here you can find the source of firstDay(Date date)

Description

first Day

License

Open Source License

Declaration

public static Date firstDay(Date date) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

public class Main {
    public static Date firstDay(Date date) {
        Calendar calendar = convert(date);
        calendar.set(Calendar.DATE, 1);
        return calendar.getTime();
    }/*w w  w .jav a2  s  .  c o m*/

    private static Calendar convert(Date date) {
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(date);
        return calendar;
    }
}

Related

  1. getDayStartTime(long time)
  2. lastDay(Date date)
  3. getDay(long dateTimeMillis)
  4. getDaySelect(String selectName, String value, boolean hasBlank)
  5. getDaySelect(String selectName, String value, boolean hasBlank, String js)
  6. getCurrentDay()