Java Week getWeek()

Here you can find the source of getWeek()

Description

get Week

License

Open Source License

Return

the current week

Declaration

public static String getWeek() 

Method Source Code

//package com.java2s;
/*************************************************************** 
 * Licensed Materials - Property of breadbox                   *  
 * (c) Copyright breadbox 2014 - All Rights Reserved           * 
 ***************************************************************/

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /**//from   w  ww .  j  av  a 2 s .c  om
     * 
     * @return the current week
     */
    public static String getWeek() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-'W'ww-F");

        return dateFormat.format(new Date());
    }
}

Related

  1. getStartDate(Date date, int weeks, Locale locale)
  2. getStartDateOfWeek(Date selectedDate, Locale locale)
  3. getThisWeek()
  4. getThisWeek()
  5. getWeek()
  6. getWeek(Date date)
  7. getWeek(int duration)
  8. getWeek(SimpleDateFormat df, String dateStr)
  9. getWeek(String date)