1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 //--------------------------------------------------------------------- 1577 // %t 1578 // 1579 // Date/Time conversions applicable to Calendar, Date, and long. 1580 //--------------------------------------------------------------------- 1581 test("%tA", "null", (Object)null); 1582 test("%TA", "NULL", (Object)null); 1583 1584 //--------------------------------------------------------------------- 1585 // %t - errors 1586 //--------------------------------------------------------------------- 1587 tryCatch("%t", UnknownFormatConversionException.class); 1588 tryCatch("%T", UnknownFormatConversionException.class); 1589 tryCatch("%tP", UnknownFormatConversionException.class); 1590 tryCatch("%TP", UnknownFormatConversionException.class); 1591 tryCatch("%.5tB", IllegalFormatPrecisionException.class); 1592 tryCatch("%#tB", FormatFlagsConversionMismatchException.class); 1593 tryCatch("%-tB", MissingFormatWidthException.class); 1594 1595 | 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 //--------------------------------------------------------------------- 1600 // %t 1601 // 1602 // Date/Time conversions applicable to Calendar, Date, and long. 1603 //--------------------------------------------------------------------- 1604 test("%tA", "null", (Object)null); 1605 test("%TA", "NULL", (Object)null); 1606 1607 //--------------------------------------------------------------------- 1608 // %t - errors 1609 //--------------------------------------------------------------------- 1610 tryCatch("%t", UnknownFormatConversionException.class); 1611 tryCatch("%T", UnknownFormatConversionException.class); 1612 tryCatch("%tP", UnknownFormatConversionException.class); 1613 tryCatch("%TP", UnknownFormatConversionException.class); 1614 tryCatch("%.5tB", IllegalFormatPrecisionException.class); 1615 tryCatch("%#tB", FormatFlagsConversionMismatchException.class); 1616 tryCatch("%-tB", MissingFormatWidthException.class); 1617 1618 |