Produced by Araxis Merge on 6/9/2017 3:51:29 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Fri Jun 9 19:51:29 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-web\src\main\java\gov\va\nvap\web\util\date | DateUtil.java | Fri Apr 21 20:03:30 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 50 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | package go v.va.nvap. web.util.d ate; | |||||
| 2 | ||||||
| 3 | import jav a.text.Par seExceptio n; | |||||
| 4 | import jav a.text.Sim pleDateFor mat; | |||||
| 5 | import jav a.util.Cal endar; | |||||
| 6 | import jav a.util.Dat e; | |||||
| 7 | ||||||
| 8 | /** | |||||
| 9 | * Utility to parse dates. | |||||
| 10 | * | |||||
| 11 | * @author Asha Amri traj | |||||
| 12 | * | |||||
| 13 | */ | |||||
| 14 | public cla ss DateUti l { | |||||
| 15 | ||||||
| 16 | pu blic stati c Date add Time(final Date date , final in t field, | |||||
| 17 | final int amount ) { | |||||
| 18 | fina l Calendar cal = Cal endar.getI nstance(); | |||||
| 19 | cal. setTime(da te); | |||||
| 20 | cal. add(field, amount); | |||||
| 21 | fina l Date new Date = cal .getTime() ; | |||||
| 22 | retu rn newDate ; | |||||
| 23 | ||||||
| 24 | } | |||||
| 25 | ||||||
| 26 | /* * | |||||
| 27 | * Parse dat e MM/dd/yy yy. | |||||
| 28 | * / | |||||
| 29 | pu blic stati c Date par seDateMMdd yyyy(final String da teString) { | |||||
| 30 | fina l SimpleDa teFormat f ormatter = new Simpl eDateForma t("MM/dd/y yyy"); | |||||
| 31 | try { | |||||
| 32 | return formatter .parse(dat eString); | |||||
| 33 | } ca tch (final ParseExce ption t) { | |||||
| 34 | throw new Runtim eException (t); | |||||
| 35 | } | |||||
| 36 | } | |||||
| 37 | ||||||
| 38 | /* * | |||||
| 39 | * Time zero ! In the b eginning.. . | |||||
| 40 | * / | |||||
| 41 | pu blic stati c Date voi dTime(fina l Date dat e) { | |||||
| 42 | fina l Calendar cal = Cal endar.getI nstance(); | |||||
| 43 | cal. setTime(da te); | |||||
| 44 | cal. set(Calend ar.HOUR_OF _DAY, 0); | |||||
| 45 | cal. set(Calend ar.MINUTE, 0); | |||||
| 46 | cal. set(Calend ar.SECOND, 0); | |||||
| 47 | cal. set(Calend ar.MILLISE COND, 0); | |||||
| 48 | retu rn cal.get Time(); | |||||
| 49 | } | |||||
| 50 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.