Reference Period
This part of the project documentation focuses on
an information-oriented approach. Use it as a
reference for the technical implementation of the
pact_methodology
project code.
ReferencePeriod
Source code in pact_methodology/carbon_footprint/reference_period.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
__init__(start, end)
Represents a reference period with a start and end date.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
start
|
DateTime
|
The start date of the reference period. |
required |
end
|
DateTime
|
The end date of the reference period. |
required |
Raises:
Type | Description |
---|---|
ValueError
|
If start date is not before end date, or if either date is not a DateTime object. |
Source code in pact_methodology/carbon_footprint/reference_period.py
8 9 10 11 12 13 14 15 16 17 18 19 |
|
includes_2025_or_later()
Checks if the reference period includes 2025 or later.
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the end date of the reference period is in 2025 or later, False otherwise. |
Source code in pact_methodology/carbon_footprint/reference_period.py
43 44 45 46 47 48 49 |
|