Android Date Month Get getThisMonth(String today)

Here you can find the source of getThisMonth(String today)

Description

get This Month

Declaration

public static String getThisMonth(String today) 

Method Source Code

//package com.java2s;

public class Main {
    public static String getThisMonth(String today) {

        String subYear = today.substring(0, 4);
        String subMonth = today.substring(5, 7);
        String subDay = today.substring(8, 10);

        Long LongMonth = new Long(subMonth);
        long longMonth = LongMonth.longValue();

        Long LongYear = new Long(subYear);
        long longYear = LongYear.longValue();

        String tomorrow;//  w  w  w.  j a v a2 s  .c om
        tomorrow = longYear + "-" + longMonth + "-" + "01";
        return tomorrow;
    }
}

Related

  1. getLastMonth(String today)