Java Calendar Minute getOffsetInMinutes(Calendar cal)

Here you can find the source of getOffsetInMinutes(Calendar cal)

Description

get Offset In Minutes

License

Apache License

Declaration

private static int getOffsetInMinutes(Calendar cal) 

Method Source Code

//package com.java2s;
/*//from  w  w  w  .  ja va2s . co  m
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You 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
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * 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;

public class Main {
    private static int getOffsetInMinutes(Calendar cal) {
        int offset = cal.get(Calendar.ZONE_OFFSET);
        offset += cal.get(Calendar.DST_OFFSET);
        offset /= (1000 * 60);
        return offset;
    }
}

Related

  1. getMinute(Calendar cal)
  2. getMinutes(Calendar cal)
  3. getMinutes(Calendar cal1, Calendar cal2)
  4. getMinutes(String expression, Calendar time)
  5. getMinutesInterval(Calendar start, Calendar end)
  6. isNow(Calendar cal, Locale locale, boolean minuteCheck)
  7. minuteFloor(Calendar calendar)
  8. roundByMinutes(Calendar cal, int interval)
  9. setCalendarHourMinSec(final Calendar originalCalendar, final int hourOfDay, final int minute, final int second)