Last change
on this file since 68 was
68,
checked in by cbipsl, 14 years ago
|
commit v1 eccad
|
-
Property svn:executable set to
*
|
File size:
662 bytes
|
Line | |
---|
1 | package org.medias.eccad.helpers; |
---|
2 | |
---|
3 | |
---|
4 | public class ConvertisseurDate { |
---|
5 | |
---|
6 | public static int getYear(String date) { |
---|
7 | //Date m_date = new Date(); |
---|
8 | |
---|
9 | String strYear = date.substring(0,4); |
---|
10 | int intYear = Integer.valueOf(strYear).intValue(); |
---|
11 | |
---|
12 | return intYear; |
---|
13 | } |
---|
14 | |
---|
15 | public static int getMonth(String date) { |
---|
16 | String strMonth = date.substring(4,6); |
---|
17 | int intMonth = Integer.valueOf(strMonth).intValue(); |
---|
18 | |
---|
19 | return intMonth; |
---|
20 | } |
---|
21 | |
---|
22 | public static int getDay(String date) { |
---|
23 | String strDay = date.substring(6,8); |
---|
24 | int intDay = Integer.valueOf(strDay).intValue(); |
---|
25 | |
---|
26 | return intDay; |
---|
27 | } |
---|
28 | |
---|
29 | |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.