Android Date String Parse tokenizeDate(String date)

Here you can find the source of tokenizeDate(String date)

Description

tokenize Date

Declaration

public static int[] tokenizeDate(String date) 

Method Source Code

//package com.java2s;
import java.util.ArrayList;

import java.util.StringTokenizer;

public class Main {
    public static int[] tokenizeDate(String date) {
        StringTokenizer st = new StringTokenizer(date, "-/");

        ArrayList<Integer> al = new ArrayList<Integer>();

        while (st.hasMoreTokens()) {
            al.add(Integer.parseInt(st.nextToken()));
        }/*from  www  .  j av a 2s .com*/

        int[] tokenList = new int[3];

        for (int i = 0; i < al.size(); i++) {
            tokenList[i] = al.get(i);
        }

        return tokenList;
    }
}

Related

  1. parseJsonDate(String jsonDate)
  2. str2Date(String str)
  3. stringConvertDate(String date)
  4. stringToDate(String date)
  5. toDate(String string)
  6. String2Date(String dateStr)
  7. changeDateWithSplit(String argDate, String split)
  8. isValidDate(String sDate)
  9. getDateTimeFromString(String dateTimeString, String format)