Java Year Month Date2Long(int year, int month, int date)

Here you can find the source of Date2Long(int year, int month, int date)

Description

Date Long

License

LGPL

Declaration

public static long Date2Long(int year, int month, int date) 

Method Source Code

//package com.java2s;
/**//  w  w  w . java  2s  .c om
 * Converts a line of text into an array of lower case words using a
 * BreakIterator.wordInstance().
 * <p>
 *
 * This method is under the Jive Open Source Software License and was
 * written by Mark Imbriaco.
 *
 * @param text
 *            a String of text to convert into an array of words
 * @return text broken up into an array of words.
 */

import java.util.*;

public class Main {
    public static long Date2Long(int year, int month, int date) {
        Calendar cld = Calendar.getInstance();
        month = month - 1;
        cld.set(year, month, date);
        return cld.getTime().getTime();
    }
}

Related

  1. createDate(final int year, final int month, final int day, final int hour, final int minutes, final int seconds, final int miliseconds)
  2. createDate(int year, int month, int day)
  3. createDate(int year, int month, int dayOfMonth)
  4. date(final int year, final int month, final int day, final int hour, final int minute, final int second)
  5. date(int year, int month, int day)
  6. encodeDateTime(int year, int month, int day, int hour, int minutes, int seconds)
  7. getAddedDate(Date date, int addYear, int addMonth, int addDay, int addHour, int addMinute, int addSecond)
  8. getAllDate(String year_month)
  9. getBeginEndDayOfMonth(String yearMonthString)