Here you can find the source of monthFromDateValue(long x)
Parameter | Description |
---|---|
x | the date value |
public static int monthFromDateValue(long x)
//package com.java2s; //License from project: Open Source License public class Main { private static final int SHIFT_MONTH = 5; /**// w w w . j a va 2 s. co m * Get the month from a date value. * * @param x the date value * @return the month (1..12) */ public static int monthFromDateValue(long x) { return (int) (x >>> SHIFT_MONTH) & 15; } }