There is more than one way to represent a billing period. The Billing Period Representation object encapsulates how a billing period is represented for a given LSE.

We represent date ranges in what we call “Genability-style”, which matches ISO 8601’s “start/end” representation of time intervals.

Data Definitions

Billing Period Representation

The Billing Period Representation has the following data structure.

Name Type Fields Description
fromDateOffset Integer M The number of days to add to a Genability-style fromDate to obtain the LSE’s start of a billing period.
toDateOffset Integer M The number of days to add to a Genability-style toDate to obtain the LSE’s end of a billing period.
style String M Our name for this particular style of a Billing Period Representation.

The different styles

A Genability-style billing period is represented by two dates: the very first date of the billing period, and the date after the last day in the billing period. For instance, January 2015 would be represented as 2015-01-01 through 2015-02-01. The style for this is GenabilityStyle. Most utilities use this style, and it matches the style of our API. SCE (Southern California Edison) uses this style.

Another common style is what we call InclusiveToDate and this may seem more intuitive. In this style, the toDate is included in the billing period. So, for example, January 2015 would be represented as 2015-01-01 through 2015-01-31. PG&E (Pacific Gas & Electric) uses this style.

An unusual style that SDG&E (San Diego Gas & Electric) uses we call ExclusiveFromDateAndInclusiveToDate; the toDate is included in the billing period but the fromDate is not. So, for example, January 2015 would be represented as 2014-12-31 through 2015-01-31. As far as we know, no other LSE uses this style.

The other style you’ll see is Unknown, which means that we have not confirmed what style the LSE uses. If the style is Unknown, we assume that it is Genability-style.

Example

If you request the information for an LSE with its extended fields included, you will see this field at the end.

GET /rest/public/lses/734

Output:

{
    status: "success",
    count: 1,
    type: "LoadServingEntity",
    results: [
    {
        lseId: 734,
        name: "Pacific Gas & Electric Co",
        lseCode: "PGE",
        ...
        billingPeriodRepresentation: {
          fromDateOffset: 0,
          toDateOffset: -1,
          style: "InclusiveToDate"
        }
    }]
}

In this example, the toDateOffset is -1, which means that you must add this value to (ie subtract one day from) a Genability-style date to obtain the PG&E toDate. Conversely, you must subtract that value from (ie add one day to) the end date of a PG&E billing period to obtain the Genability-style toDate. For instance, if you have a PG&E bill from March 8th, 2015 through April 7th, 2015 (31 days), the equivalent Genability-style date range is 2015-03-08 through 2015-04-08.