Java Calendar Millisecond setTimeInMillis(Calendar _calendar, long _timemillis)

Here you can find the source of setTimeInMillis(Calendar _calendar, long _timemillis)

Description

set Time In Millis

License

Open Source License

Declaration

public static void setTimeInMillis(Calendar _calendar, long _timemillis) 

Method Source Code

//package com.java2s;
/*************************************************************************
 * /*  w  w w. j  av a 2s  .  co m*/
 *  Copyright 2009 by Giuseppe Castagno beppec56@openoffice.org
 *  
 *  The Contents of this file are made available subject to
 *  the terms of European Union Public License (EUPL) version 1.1
 *  as published by the European Community.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the EUPL.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  EUPL for more details.
 *
 *  You should have received a copy of the EUPL along with this
 *  program.  If not, see:
 *  https://www.osor.eu/eupl, http://ec.europa.eu/idabc/eupl.
 *
 ************************************************************************/

import java.util.Calendar;

public class Main {
    public static void setTimeInMillis(Calendar _calendar, long _timemillis) {
        java.util.Date dDate = new java.util.Date();
        dDate.setTime(_timemillis);
        _calendar.setTime(dDate);
    }
}

Related

  1. hasZeroMilliSeconds(Calendar cal)
  2. newCalendar(long timeInMillis)
  3. setCalendar(Calendar calendar, int wholeDays, int millisecondsInDay, boolean use1904windowing)
  4. setCalendar(Calendar calendar, int wholeDays, int millisecondsInDay, boolean use1904windowing, boolean roundSeconds)
  5. setCalendarTime(Calendar inCalendar, int hr, int min, int sec, int milliSec)
  6. toCalendar(final long millis)
  7. toCalendar(long millis)
  8. toStringDateTimeMillisecond(Calendar calendar)
  9. translateToMilliseconds(Calendar calendar)