Java Calendar Time getTimeYYYYMMDD(Calendar calendar)

Here you can find the source of getTimeYYYYMMDD(Calendar calendar)

Description

get Time YYYYMMDD

License

Open Source License

Declaration

private static int getTimeYYYYMMDD(Calendar calendar) 

Method Source Code

//package com.java2s;
/**************************************************************************************
 * Copyright (C) 2008 EsperTech, Inc. All rights reserved.                            *
 * http://esper.codehaus.org                                                          *
 * http://www.espertech.com                                                           *
 * ---------------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the GPL license       *
 * a copy of which has been included with this distribution in the license.txt file.  *
 **************************************************************************************/

import java.util.Calendar;

public class Main {
    private static int getTimeYYYYMMDD(Calendar calendar) {
        return 10000 * calendar.get(Calendar.YEAR) + (calendar.get(Calendar.MONTH) + 1) * 100
                + calendar.get(Calendar.DAY_OF_MONTH);
    }/*from  w  w  w  .  j  av a 2  s  .c om*/
}

Related

  1. getTimeFrame(final Calendar calFrom, final Calendar calTo)
  2. getTimeInHHMMSS(Calendar time)
  3. getTimeStr(Calendar cal)
  4. getTimeToString(Calendar argCal)
  5. getTimeValue(Calendar cal)
  6. getTimeZone(Calendar cal)
  7. getTimeZoneCalendar(final TimeZone timeZone)
  8. getTimezoneString(Calendar cal)
  9. hasTime(Calendar cal)