Android Timestamp Get getWeekOfYear(Calendar cal, Timestamp ts)

Here you can find the source of getWeekOfYear(Calendar cal, Timestamp ts)

Description

get Week Of Year

Declaration

public static int getWeekOfYear(Calendar cal, Timestamp ts) 

Method Source Code

//package com.java2s;

import java.sql.Timestamp;

import java.util.Calendar;

public class Main {
    public static int getWeekOfYear(Calendar cal, Timestamp ts) {
        if (cal == null) {
            cal = Calendar.getInstance();
        }//w w w.  j a  v  a 2s  .c o  m
        cal.setTimeInMillis(ts.getTime());
        return cal.get(Calendar.WEEK_OF_YEAR);
    }
}

Related

  1. getFriendlyTimeStamp()
  2. getLastOfMonth(Timestamp t1)
  3. getLastOfYear(Timestamp t1)
  4. getRelativeTimeofTweet(String timeStamp)
  5. getTimestamp(Timestamp timestamp, int day, int hour, int minute)
  6. getTimeStamp()
  7. getTimestamp(Context context)