Advertisement
robin4002

Untitled

Sep 2nd, 2013
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. import java.text.SimpleDateFormat;
  2. import java.util.Date;
  3.  
  4. public class World
  5. {
  6.     public static void main(String[] args)
  7.     {
  8.         Date date = new Date();
  9.         int day = Integer.parseInt(new SimpleDateFormat("dd").format(date));
  10.         int month = Integer.parseInt(new SimpleDateFormat("MM").format(date));
  11.         if(day > 2 && month == 9)
  12.         {
  13.             day = 2;
  14.             month = 9;
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement