Example #1
0
    public static string GetInputFormatOrNull(this IBasicObjectExtensionPropertyInfo property)
    {
        var formatString = property.GetDataFormatStringOrNull();

        if (!formatString.IsNullOrWhiteSpace())
        {
            return(formatString);
        }

        if (property.IsDate())
        {
            return("{0:yyyy-MM-dd}");
        }

        if (property.IsDateTime())
        {
            return("{0:yyyy-MM-ddTHH:mm}");
        }

        return(null);
    }