4.4.  Comparing Date Values

It rarely makes sense to compare date values ​​of two PDF documents, but if it is really needed, you can use the following methods:

// Methods comparing dates:

.haveSameCreationDate()
.haveSameModificationDate()

In the next example, the modification dates of two documents are compared:

@Test
public void haveSameModificationDate() throws Exception {
  String filenameTest = "documentUnderTest.pdf";
  String filenameReference = "reference.pdf";
  
  AssertThat.document(filenameTest)
            .and(filenameReference) 
            .haveSameModificationDate()
  ;
}

Comparing two dates is always carried out with the time resolution DateResolution.DATE.