Here you can find the source of yearFromDateValue(long x)
Parameter | Description |
---|---|
x | the date value |
public static int yearFromDateValue(long x)
//package com.java2s; //License from project: Open Source License public class Main { private static final int SHIFT_YEAR = 9; /**//from w w w. j av a 2 s . c o m * Get the year from a date value. * * @param x the date value * @return the year */ public static int yearFromDateValue(long x) { return (int) (x >>> SHIFT_YEAR); } }