# Generated by detroit
# See https://github.com/bourbonut/detroit/tree/main/api_maker

from functools import partial
from operator import is_not

class scaleTime:
    def __init__(self, content="scaleTime"):
        self.content = content

    def __repr__(self):
        return self.content

    def __str__(self):
        return self.content

    def __call__(self, *args):
        arguments = ", ".join(map(repr, args))
        return f"{self}({arguments})"

    def ticks(self, count=None):
        """
        Examples · Source · Returns representative dates from the scale’s domain.
        .. code:: javascript

            const x = d3.scaleTime();
            x.ticks(10);
            // [Sat Jan 01 2000 00:00:00 GMT-0800 (PST),
            //  Sat Jan 01 2000 03:00:00 GMT-0800 (PST),
            //  Sat Jan 01 2000 06:00:00 GMT-0800 (PST),
            //  Sat Jan 01 2000 09:00:00 GMT-0800 (PST),
            //  Sat Jan 01 2000 12:00:00 GMT-0800 (PST),
            //  Sat Jan 01 2000 15:00:00 GMT-0800 (PST),
            //  Sat Jan 01 2000 18:00:00 GMT-0800 (PST),
            //  Sat Jan 01 2000 21:00:00 GMT-0800 (PST),
            //  Sun Jan 02 2000 00:00:00 GMT-0800 (PST)]

        The returned tick values are uniformly-spaced (mostly), have sensible values (such as
        every day at midnight), and are guaranteed to be within the extent of the domain. Ticks
        are often used to display reference lines, or tick marks, in conjunction with the
        visualized data.
        An optional count may be specified to affect how many ticks are generated. If count is
        not specified, it defaults to 10. The specified count is only a hint; the scale may
        return more or fewer values depending on the domain.
        The following time intervals are considered for automatic ticks:
        In lieu of a count, a time interval may be explicitly specified. To prune the generated
        ticks for a given time interval, use interval.every. For example, to generate ticks at
        15-minute intervals:
        .. code:: javascript

            const x = d3.scaleUtc().domain([new Date("2000-01-01T00:00Z"), new Date("2000-01-01T02:00Z")]);
            x.ticks(d3.utcMinute.every(15));
            // [2000-01-01T00:00Z,
            //  2000-01-01T00:15Z,
            //  2000-01-01T00:30Z,
            //  2000-01-01T00:45Z,
            //  2000-01-01T01:00Z,
            //  2000-01-01T01:15Z,
            //  2000-01-01T01:30Z,
            //  2000-01-01T01:45Z,
            //  2000-01-01T02:00Z]

        Note: in some cases, such as with day ticks, specifying a step can result in irregular
        spacing of ticks because time intervals have varying length.

        See more informations `here <https://d3js.org/d3-scale/time#time_ticks>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (count,))))
        return scaleTime(content=f"{self.content}.ticks({arguments})")


    def tickFormat(self, count=None, specifier=None):
        """
        Examples · Source · Returns a time format function suitable for displaying tick values.
        .. code:: javascript

            const x = d3.scaleUtc().domain([new Date("2000-01-01T00:00Z"), new Date("2000-01-01T02:00Z")]);
            const T = x.ticks(); // [2000-01-01T00:00Z, 2000-01-01T00:15Z, 2000-01-01T00:30Z, …]
            const f = x.tickFormat();
            T.map(f); // ["2000", "12:15", "12:30", "12:45", "01 AM", "01:15", "01:30", "01:45", "02 AM"]

        The specified count is currently ignored, but is accepted for consistency with other
        scales such as linear.tickFormat. If a format specifier is specified, this method is
        equivalent to format. If specifier is not specified, the default time format is
        returned. The default multi-scale time format chooses a human-readable representation
        based on the specified date as follows:
        Although somewhat unusual, this default behavior has the benefit of providing both
        local and global context: for example, formatting a sequence of ticks as [11 PM, Mon
        07, 01 AM] reveals information about hours, dates, and day simultaneously, rather than
        just the hours [11 PM, 12 AM, 01 AM]. See d3-time-format if you’d like to roll your own
        conditional time format.

        See more informations `here <https://d3js.org/d3-scale/time#time_tickFormat>`_.
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (count, specifier))))
        return scaleTime(content=f"{self.content}.tickFormat({arguments})")


    def nice(self):
        """
        Auto generated method
        """
        return scaleTime(content=f"{self.content}.nice()")


    def domain(self, domain=None):
        """
        Auto generated method
        """
        arguments = ", ".join(map(repr, filter(partial(is_not, None), (domain,))))
        return scaleTime(content=f"{self.content}.domain({arguments})")

