Java Month extractMonthFromDate(String dateString)

Here you can find the source of extractMonthFromDate(String dateString)

Description

extract Month From Date

License

Open Source License

Declaration

public static int extractMonthFromDate(String dateString) 

Method Source Code

//package com.java2s;
/***********************************************************************
 * Copyright (c) 2015 by Regents of the University of Minnesota.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License, Version 2.0 which 
 * accompanies this distribution and is available at
 * http://www.opensource.org/licenses/apache2.0.php.
 *
 *************************************************************************/

public class Main {
    public static int extractMonthFromDate(String dateString) {
        int start = dateString.indexOf(".") + 1;
        int to = dateString.lastIndexOf(".");
        return Integer.parseInt(dateString.substring(start, to));
    }//w  w w  . j  av  a  2 s.  c  o  m
}

Related

  1. createDateMonth(String dateYear)
  2. createTestCCMonth()
  3. daemonThread(Runnable runnable)
  4. displayMonthlyPeriod(String week)
  5. doy2month(int year, int doy)
  6. findMonth(String strMonth)
  7. fixMonth(int month)
  8. fixMonth(String m)
  9. getAllowMonth(String startdate, int count)