Show / Hide Table of Contents

    Class NumberDateFormat

    This parses into date strings and vice-versa. It uses the given dateFormat and locale to parse and format dates, but before, it converts to objects or vice-versa.

    Note that the value the dates are parsed into and out of represent the number of milliseconds since January 1, 1970 0:00:00, also known as the "epoch".

    Inheritance
    System.Object
    NumberDateFormat
    Namespace: Lucene.Net.QueryParsers.Flexible.Standard.Config
    Assembly: Lucene.Net.QueryParser.dll
    Syntax
    public class NumberDateFormat : NumberFormat

    Constructors

    | Improve this Doc View Source

    NumberDateFormat(DateFormat, DateFormat, CultureInfo)

    Constructs a NumberDateFormat object using the given dateStyle, timeStyle, and locale.

    Declaration
    public NumberDateFormat(DateFormat dateStyle, DateFormat timeStyle, CultureInfo locale)
    Parameters
    Type Name Description
    DateFormat dateStyle
    DateFormat timeStyle
    CultureInfo locale
    | Improve this Doc View Source

    NumberDateFormat(String, CultureInfo)

    Constructs a NumberDateFormat object using the given dateFormat and locale.

    Declaration
    public NumberDateFormat(string dateFormat, CultureInfo locale)
    Parameters
    Type Name Description
    System.String dateFormat

    Date format used to parse and format dates

    CultureInfo locale

    Fields

    | Improve this Doc View Source

    EPOCH

    Declaration
    public const long EPOCH = null
    Field Value
    Type Description
    System.Int64

    Properties

    | Improve this Doc View Source

    TimeZone

    Declaration
    public virtual TimeZoneInfo TimeZone { get; set; }
    Property Value
    Type Description
    TimeZoneInfo

    Methods

    | Improve this Doc View Source

    Format(Double)

    Declaration
    public override string Format(double number)
    Parameters
    Type Name Description
    System.Double number
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Format(Int64)

    Declaration
    public override string Format(long number)
    Parameters
    Type Name Description
    System.Int64 number
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Format(Object)

    Declaration
    public override string Format(object number)
    Parameters
    Type Name Description
    System.Object number
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetDateFormat()

    Returns the .NET date format that will be used to Format the date. Note that parsing the date uses .

    Declaration
    public string GetDateFormat()
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    GetDateFormat(DateFormat, DateFormat, CultureInfo)

    Declaration
    public static string GetDateFormat(DateFormat dateStyle, DateFormat timeStyle, CultureInfo locale)
    Parameters
    Type Name Description
    DateFormat dateStyle
    DateFormat timeStyle
    CultureInfo locale
    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    Parse(String)

    Declaration
    public override object Parse(string source)
    Parameters
    Type Name Description
    System.String source
    Returns
    Type Description
    System.Object
    | Improve this Doc View Source

    SetDateFormat(String)

    Declaration
    public void SetDateFormat(string dateFormat)
    Parameters
    Type Name Description
    System.String dateFormat
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)