/*----------------------------------------------------------------------------------
 Tests date format adjustments for variable format assignment in OpenEdge
 ABL across a limited subset of all possible format permutations for the six
 SESSION:DATE-FORMAT settings.

 Only formats with components "99" and/or "9999" are tested in this class (e.g.,
 "99.99.99", "9999.99.9999", "99/9999.99").
----------------------------------------------------------------------------------*/
ROUTINE-LEVEL ON ERROR UNDO, THROW.

USING OpenEdge.Core.Assert FROM PROPATH.

CLASS unittests.gui.fillin.date.adjustment.TestDateFormatAssignAdjustment:

    /* DATE variable to test */
    DEFINE PRIVATE VARIABLE d AS DATE NO-UNDO.

    /* Frame for DATE variable */
    DEFINE FRAME myFrame
        d
        WITH NO-LABELS NO-BOX DOWN.

    /**
     * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "mdy"
     */
    @Test.
    METHOD PUBLIC VOID testMdyFormatAdjustment():
        SESSION:DATE-FORMAT = "mdy".
        d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/9999". Assert:equals("9999.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.

/**
 * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "mdy"
 */
@Test.
METHOD PUBLIC VOID testMdyFormatAdjustmentNew():
    SESSION:DATE-FORMAT = "mdy".
    d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.9999/9999". Assert:equals("9999.9999/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
    d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.

    /**
     * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "dmy"
     */
    @Test.
    METHOD PUBLIC VOID testDmyFormatAdjustment():
        SESSION:DATE-FORMAT = "dmy".
        d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("99.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("99/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("99-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("99.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("99/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("99-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("99.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("99/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("99-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/9999". Assert:equals("9999.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.

    /**
     * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "ymd"
     */
    @Test.
    METHOD PUBLIC VOID testYmdFormatAdjustment():
        SESSION:DATE-FORMAT = "ymd".
        d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("9999/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("9999-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("9999.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("9999-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("9999.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("9999/99-99", d:FORMAT IN FRAME myFrame). // 9999-99-99
        d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("9999/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("9999-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("9999.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("9999-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("9999.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("9999/99-99", d:FORMAT IN FRAME myFrame). // 9999-99-99
        d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("9999.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("9999.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("9999/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("9999/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("9999-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("9999-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/9999". Assert:equals("9999.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.

    /**
     * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "myd"
     */
    @Test.
    METHOD PUBLIC VOID testMydFormatAdjustment():
        SESSION:DATE-FORMAT = "myd".
        d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("99.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("99.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("99/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("99/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("99-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("99-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("99.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("99.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("99/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("99/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("99-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("99-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("99.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("99.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("99/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("99/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("99-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("99-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/9999". Assert:equals("9999.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.

    /**
     * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "dym"
     */
    @Test.
    METHOD PUBLIC VOID testDymFormatAdjustment():
        SESSION:DATE-FORMAT = "dym".
        d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("99.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("99.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("99/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("99/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("99-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("99-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("99.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("99/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("99-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/9999". Assert:equals("9999.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.

    /**
     * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "ydm"
     */
    @Test.
    METHOD PUBLIC VOID testYdmFormatAdjustment():
        SESSION:DATE-FORMAT = "ydm".
        d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame). // 9999-99-99
        d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame). // 9999/99.99
        d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame). // 9999-99.99
        d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame). // 9999.99/99
        d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame). // 9999-99/99
        d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame). // 9999.99-99
        d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame). // 9999-99-99
        d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("9999.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("9999.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("9999/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("9999/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("9999-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("9999-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.
    
    /**
     * Tests FORMAT adjustments for SESSION:DATE-FORMAT = "ydm"
     */
    @Test.
    METHOD PUBLIC VOID testYdmFormatAdjustmentNew():
        SESSION:DATE-FORMAT = "ydm".
        d:FORMAT IN FRAME myFrame = "99.99.99".     Assert:equals("99.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/99".     Assert:equals("99.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-99".     Assert:equals("99.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.99".     Assert:equals("99/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/99".     Assert:equals("99/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-99".     Assert:equals("99/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.99".     Assert:equals("99-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/99".     Assert:equals("99-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-99".     Assert:equals("99-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99.9999".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99/9999".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.99-9999".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99.9999".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99/9999".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/99-9999".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99.9999".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99/9999".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-99-9999".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999.9999". Assert:equals("99.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999/9999". Assert:equals("99.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99.9999-9999". Assert:equals("99.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999.9999". Assert:equals("99/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999/9999". Assert:equals("99/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99/9999-9999". Assert:equals("99/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999.9999". Assert:equals("99-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999/9999". Assert:equals("99-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "99-9999-9999". Assert:equals("99-9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.99".   Assert:equals("9999.99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/99".   Assert:equals("9999.99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-99".   Assert:equals("9999.99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.99".   Assert:equals("9999/99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/99".   Assert:equals("9999/99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-99".   Assert:equals("9999/99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.99".   Assert:equals("9999-99.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/99".   Assert:equals("9999-99/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-99".   Assert:equals("9999-99-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99.9999". Assert:equals("9999.99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99/9999". Assert:equals("9999.99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.99-9999". Assert:equals("9999.99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99.9999". Assert:equals("9999/99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99/9999". Assert:equals("9999/99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/99-9999". Assert:equals("9999/99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99.9999". Assert:equals("9999-99.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99/9999". Assert:equals("9999-99/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-99-9999". Assert:equals("9999-99-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.99". Assert:equals("9999.9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/99". Assert:equals("9999.9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-99". Assert:equals("9999.9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.99". Assert:equals("9999/9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/99". Assert:equals("9999/9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-99". Assert:equals("9999/9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.99". Assert:equals("9999-9999.99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/99". Assert:equals("9999-9999/99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-99". Assert:equals("9999-9999-99", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999.9999". Assert:equals("9999.9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999/9999". Assert:equals("9999.9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999.9999-9999". Assert:equals("9999.9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999.9999". Assert:equals("9999/9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999/9999". Assert:equals("9999/9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999/9999-9999". Assert:equals("9999/9999-9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999.9999". Assert:equals("9999-9999.9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999/9999". Assert:equals("9999-9999/9999", d:FORMAT IN FRAME myFrame).
        d:FORMAT IN FRAME myFrame = "9999-9999-9999". Assert:equals("9999-9999-9999", d:FORMAT IN FRAME myFrame).
    END METHOD.
END CLASS.
    