> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daytalog.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Total

> A collection of methods for retrieving aggregated totals of all logs

## Usage

```javascript theme={null}
const { total } = useDaytalog();
```

## Properties

### <span className="visually-hidden">days()</span>

<ResponseField name="days()" type="string">
  Retrieves the total number of days.

  <br />

  You can optionally specify the minimum number of digits in the returned string (1 | 2 | 3).

  <Expandable title="Example">
    ```javascript theme={null}
    const totalDays = total.days();
    console.log(totalDays); // Output: "52"
    // With minimum digits
    const totalDaysPadded = total.days(3);
    console.log(totalDaysPadded); // Output: "052"
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">dayRange()</span>

<ResponseField name="dayRange()" type="[string, string]">
  Retrieves the first and last day numbers as strings, e.g. <code>\["1", "52"]</code>.

  <br />

  You can optionally specify the minimum number of digits in the returned strings (1 | 2 | 3).

  <Expandable title="Example">
    ```javascript theme={null}
    const [startDay, endDay] = total.dayRange();
    console.log(startDay, endDay); // Output: "1", "52"
    // With minimum digits
    const [startDayPadded, endDayPadded] = total.dayRange(2);
    console.log(startDayPadded, endDayPadded); // Output: "01", "52"
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">dateRange()</span>

<ResponseField name="dateRange()" type="[string, string]">
  Retrieves the first and last date of the project.

  <br />

  Returns a tuple of strings: <code>\[startDate, endDate]</code>. You can optionally pass formatting options.

  <br />

  Options: <code>dateRange({'{'} format: DateFormatOptions {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    const [start, end] = total.dateRange();
    const dates = `${start} - ${end}`;
    console.log(dates); // Output: 2025-01-01 - 2025-12-31
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">ocf.files()</span>

<ResponseField name="ocf.files()" type="number">
  Retrieves the total number of OCF files.

  <Expandable title="Example">
    ```javascript theme={null}
    const totalFiles = total.ocf.files();
    console.log(totalFiles); // Output: 13214
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">ocf.size()</span>

<ResponseField name="ocf.size()" type="string">
  Gets the size of all OCF files in a user-friendly format, such as "1.17 GB" or "117 MB".

  <br />

  You can specify the unit of measurement you prefer by providing an options object. The default unit is <code>"auto"</code>.

  <br />

  Options: <code>ocf.size({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Automatically choose the best unit
    const sizeAuto = total.ocf.size();
    console.log(sizeAuto); // Output: "117 MB"
    // Specify the unit as Gigabytes
    const sizeGB = total.ocf.size({ type: 'gb' });
    console.log(sizeGB); // Output: "0.117 GB"
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">ocf.sizeAsNumber()</span>

<ResponseField name="ocf.sizeAsNumber()" type="number">
  Retrieves the OCF size as a numerical value.

  <br />

  This method returns the size in a numerical format, which can be useful for calculations or comparisons. The default unit is <code>"bytes"</code>.

  <br />

  Options: <code>ocf.sizeAsNumber({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Get size in the default unit (bytes)
    const sizeNumberDefault = total.ocf.sizeAsNumber();
    console.log(sizeNumberDefault); // Output: 117000000
    // Get size in Gigabytes
    const sizeNumberGB = total.ocf.sizeAsNumber({ type: 'gb' });
    console.log(sizeNumberGB); // Output: 0.117
    // Get size in Megabytes
    const sizeNumberMB = total.ocf.sizeAsNumber({ type: 'mb' });
    console.log(sizeNumberMB); // Output: 117
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">ocf.sizeAsTuple()</span>

<ResponseField name="ocf.sizeAsTuple()" type="[number, string]">
  Obtains the OCF size as a pair containing both the numerical value and its unit.

  <br />

  This method returns an array where the first element is the size number and the second element is the unit. The default unit is <code>"auto"</code>.

  <br />

  Options: <code>ocf.sizeAsTuple({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Get size as a tuple with automatic unit
    const sizeTupleAuto = total.ocf.sizeAsTuple();
    console.log(sizeTupleAuto); // Output: [117, 'MB']
    // Get size as a tuple in Gigabytes
    const sizeTupleGB = total.ocf.sizeAsTuple({ type: 'gb' });
    console.log(sizeTupleGB); // Output: [0.117, 'GB']
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">ocf.duration()</span>

<ResponseField name="ocf.duration()" type="string">
  Retrieves the total OCF duration in a human-readable string format (e.g., "1h, 30m, 45s").

  <Expandable title="Example">
    ```javascript theme={null}
    const duration = total.ocf.duration();
    console.log(duration); // Output: "1h, 30m, 45s"
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">ocf.durationTC()</span>

<ResponseField name="ocf.durationTC()" type="string">
  Retrieves the total OCF duration in timecode format (e.g., "01:30:45:00").

  <Expandable title="Example">
    ```javascript theme={null}
    const durationTC = total.ocf.durationTC();
    console.log(durationTC); // Output: "01:30:45:00"
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">ocf.durationObject()</span>

<ResponseField name="ocf.durationObject()" type="{ hours: number; minutes: number; seconds: number }">
  Retrieves the total OCF duration as an object with time components: hours, minutes, and seconds.

  <Expandable title="Example">
    ```javascript theme={null}
    const durationObj = total.ocf.durationObject();
    console.log(durationObj); // Output: { hours: 1, minutes: 30, seconds: 45 }
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">proxy.files()</span>

<ResponseField name="proxy.files()" type="number">
  Retrieves the total number of proxy files.

  <Expandable title="Example">
    ```javascript theme={null}
    const totalFiles = total.proxy.files();
    console.log(totalFiles); // Output: 13214
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">proxy.size()</span>

<ResponseField name="proxy.size()" type="string">
  Gets the size of all proxy files in a user-friendly format, such as "1.17 GB" or "117 MB".

  <br />

  You can specify the unit of measurement you prefer by providing an options object. The default unit is <code>"auto"</code>.

  <br />

  Options: <code>proxy.size({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Automatically choose the best unit
    const sizeAuto = total.proxy.size();
    console.log(sizeAuto); // Output: "117 MB"
    // Specify the unit as Gigabytes
    const sizeGB = total.proxy.size({ type: 'gb' });
    console.log(sizeGB); // Output: "0.117 GB"
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">proxy.sizeAsNumber()</span>

<ResponseField name="proxy.sizeAsNumber()" type="number">
  Retrieves the proxy size as a numerical value.

  <br />

  This method returns the size in a numerical format, which can be useful for calculations or comparisons. The default unit is <code>"bytes"</code>.

  <br />

  Options: <code>proxy.sizeAsNumber({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Get size in the default unit (bytes)
    const sizeNumberDefault = total.proxy.sizeAsNumber();
    console.log(sizeNumberDefault); // Output: 117000000
    // Get size in Gigabytes
    const sizeNumberGB = total.proxy.sizeAsNumber({ type: 'gb' });
    console.log(sizeNumberGB); // Output: 0.117
    // Get size in Megabytes
    const sizeNumberMB = total.proxy.sizeAsNumber({ type: 'mb' });
    console.log(sizeNumberMB); // Output: 117
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">proxy.sizeAsTuple()</span>

<ResponseField name="proxy.sizeAsTuple()" type="[number, string]">
  Obtains the proxy size as a pair containing both the numerical value and its unit.

  <br />

  This method returns an array where the first element is the size number and the second element is the unit. The default unit is <code>"auto"</code>.

  <br />

  Options: <code>proxy.sizeAsTuple({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Get size as a tuple with automatic unit
    const sizeTupleAuto = total.proxy.sizeAsTuple();
    console.log(sizeTupleAuto); // Output: [117, 'MB']
    // Get size as a tuple in Gigabytes
    const sizeTupleGB = total.proxy.sizeAsTuple({ type: 'gb' });
    console.log(sizeTupleGB); // Output: [0.117, 'GB']
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">sound.files()</span>

<ResponseField name="sound.files()" type="number">
  Retrieves the total number of sound files.

  <Expandable title="Example">
    ```javascript theme={null}
    const totalFiles = total.sound.files();
    console.log(totalFiles); // Output: 13214
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">sound.size()</span>

<ResponseField name="sound.size()" type="string">
  Gets the size of all sound files in a user-friendly format, such as "1.17 GB" or "117 MB".

  <br />

  You can specify the unit of measurement you prefer by providing an options object. The default unit is <code>"auto"</code>.

  <br />

  Options: <code>sound.size({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Automatically choose the best unit
    const sizeAuto = total.sound.size();
    console.log(sizeAuto); // Output: "117 MB"
    // Specify the unit as Gigabytes
    const sizeGB = total.sound.size({ type: 'gb' });
    console.log(sizeGB); // Output: "0.117 GB"
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">sound.sizeAsNumber()</span>

<ResponseField name="sound.sizeAsNumber()" type="number">
  Retrieves the sound size as a numerical value.

  <br />

  This method returns the size in a numerical format, which can be useful for calculations or comparisons. The default unit is <code>"bytes"</code>.

  <br />

  Options: <code>sound.sizeAsNumber({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Get size in the default unit (bytes)
    const sizeNumberDefault = total.sound.sizeAsNumber();
    console.log(sizeNumberDefault); // Output: 117000000
    // Get size in Gigabytes
    const sizeNumberGB = total.sound.sizeAsNumber({ type: 'gb' });
    console.log(sizeNumberGB); // Output: 0.117
    // Get size in Megabytes
    const sizeNumberMB = total.sound.sizeAsNumber({ type: 'mb' });
    console.log(sizeNumberMB); // Output: 117
    ```
  </Expandable>
</ResponseField>

### <span className="visually-hidden">sound.sizeAsTuple()</span>

<ResponseField name="sound.sizeAsTuple()" type="[number, string]">
  Obtains the sound size as a pair containing both the numerical value and its unit.

  <br />

  This method returns an array where the first element is the size number and the second element is the unit. The default unit is <code>"auto"</code>.

  <br />

  Options: <code>sound.sizeAsTuple({'{'} type: "auto" | "tb" | "gb" | "mb" | "bytes" {'}'})</code>

  <Expandable title="Example">
    ```javascript theme={null}
    // Get size as a tuple with automatic unit
    const sizeTupleAuto = total.sound.sizeAsTuple();
    console.log(sizeTupleAuto); // Output: [117, 'MB']
    // Get size as a tuple in Gigabytes
    const sizeTupleGB = total.sound.sizeAsTuple({ type: 'gb' });
    console.log(sizeTupleGB); // Output: [0.117, 'GB']
    ```
  </Expandable>
</ResponseField>
