Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import jpb.*;
- public class ConvertDate {
- public static void main (String[] args) {
- SimpleIO.prompt("Enter date to be converted:");
- String data = SimpleIO.readLine();
- int firstSpace = data.indexOf(" ");
- String month = data.substring(0, firstSpace);
- String lowercaseMonth = month.toLowerCase();
- int secondSpace = data.indexOf(" ");
- String dd = data.substring (0, Trim(firstSpace), secondSpace);
- int thirdSpace = data.substring(" ");
- String yyyy = data.substring(0, Trim(firstSpace, secondSpace), thirdSpace);
- System.out.println("Converted date:" + dd + lowercaseMonth + yyyy );
- }
- }
Add Comment
Please, Sign In to add comment