Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(date-time): add date-time getter #158 #167

Merged
merged 3 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Add multi-factor authentication support ([PR146](https://github.com/5pm-HDH/churchtools-api/pull/146))
- Group-member-fields and DBFields-API ([PR147](https://github.com/5pm-HDH/churchtools-api/issues/147))
- Pagination Page-Size Option ([PR163](https://github.com/5pm-HDH/churchtools-api/pull/163))
- DateTime-Getter ([PR167](https://github.com/5pm-HDH/churchtools-api/pull/167))

### Changed
- Refactor Imports ([PR165](https://github.com/5pm-HDH/churchtools-api/pull/165))
Expand Down
6 changes: 6 additions & 0 deletions docs/out/AbsenceAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,18 @@
var_dump( $vaccationAbsence->getStartDate());
// Output: "2022-02-23"

var_dump( $vaccationAbsence->getStartDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2022-02-23 00:00:00"

var_dump( $vaccationAbsence->getStartTime());
// Output: null

var_dump( $vaccationAbsence->getEndDate());
// Output: "2022-02-25"

var_dump( $vaccationAbsence->getEndDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2022-02-25 00:00:00"

var_dump( $vaccationAbsence->getEndTime());
// Output: null

Expand Down
7 changes: 7 additions & 0 deletions docs/out/CalendarAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,13 @@ Load appointments for calendar:
var_dump( $lastAppointment->getEndDate());
// Output: "2022-08-07T16:00:00Z"

var_dump( $lastAppointment->getStartDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2022-08-07 15:00:00"

var_dump( $lastAppointment->getEndDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2022-08-07 16:00:00"


var_dump( $lastAppointment->getAllDay());
// Output: "false"

Expand Down
9 changes: 9 additions & 0 deletions docs/out/EventAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
var_dump( $christmasService->getEndDate());
// Output: "2021-09-02 22:00:00"

var_dump( $christmasService->getStartDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2021-09-02 20:15:00"

var_dump( $christmasService->getEndDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2021-09-02 22:00:00"

var_dump( $christmasService->getChatStatus());
// Output: false

Expand Down Expand Up @@ -147,6 +153,9 @@
var_dump( $eventService?->getRequestedDate());
// Output: "2001-01-02 02:02:12"

var_dump( $eventService?->getRequestedDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2001-01-02 02:02:12"

var_dump( $eventService?->getRequesterPersonId());
// Output: "21"

Expand Down
100 changes: 90 additions & 10 deletions docs/out/GroupAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
var_dump( $group->getPermissions());
// Output: []

var_dump( $group->getInformation());
// Output: null

var_dump( $group->getFollowUp());
// Output: []

Expand All @@ -54,6 +51,62 @@
$childGroups = $group->requestGroupChildren()?->get();
$parentGroups = $group->requestGroupParents()?->get();

// GroupInformation
$groupInformation = $group->getInformation();
var_dump( $groupInformation?->getImageUrl());
// Output: null

var_dump( $groupInformation?->getGroupHomepageUrl());
// Output: null

var_dump( $groupInformation?->getGroupStatusId());
// Output: 1

var_dump( $groupInformation?->getGroupTypeId());
// Output: 2

var_dump( $groupInformation?->getDateOfFoundation());
// Output: "1903-02-12"

var_dump( $groupInformation?->getDateOfFoundationAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "1903-02-12 00:00:00"

var_dump( $groupInformation?->getEndDate());
// Output: null

var_dump( $groupInformation?->getEndDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: null

var_dump( $groupInformation?->getMeetingTime());
// Output: "17:00"

var_dump( $groupInformation?->getGroupCategoryId());
// Output: 3


$ageGroupIdList = implode("/", $groupInformation?->getAgeGroupIds());
var_dump( $ageGroupIdList);
// Output: "1/8"

var_dump( $groupInformation?->getTargetGroupId());
// Output: 2

var_dump( $groupInformation?->getMaxMembers());
// Output: 200

var_dump( $groupInformation?->getNote());
// Output: "Hello World Note"

var_dump( $groupInformation?->getCampusId());
// Output: null

var_dump( $groupInformation?->getChatStatus());
// Output: "NOT_STARTED"

var_dump( $groupInformation?->getSignUpOverrideRoleId());
// Output: null


// GroupSettings;
var_dump( $group->getSettings()?->getIsHidden());
// Output: false
Expand Down Expand Up @@ -149,22 +202,39 @@
// GroupMembers
$groupMember = $group->requestMembers()?->get()[0];

var_dump( $groupMember?->getId());
// Output: "21"

var_dump( $groupMember?->getPersonId());
// Output: null
// Output: 12

var_dump( $groupMember?->getGroupTypeRoleId());
// Output: null
// Output: 16

var_dump( $groupMember?->getGroupMemberStatus());
// Output: "active"

var_dump( $groupMember?->getMemberStartDate());
// Output: "2023-05-04"

var_dump( $groupMember?->getMemberEndDate());
// Output: "2023-06-01"

var_dump( $groupMember?->getMemberStartDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2023-05-04 00:00:00"

var_dump( $groupMember?->getMemberEndDateAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2023-06-01 00:00:00"


var_dump( $groupMember?->getFollowUpStep());
// Output: null

var_dump( $groupMember?->getComment());
var_dump( $groupMember?->getFollowUpDiffDays());
// Output: null

var_dump( $groupMember?->getMemberEndDate());
var_dump( $groupMember?->getFollowUpUnsuccessfulBackGroupId());
// Output: null


var_dump( $groupMember?->getComment());
// Output: null

var_dump( $groupMember?->getWaitinglistPosition());
Expand All @@ -173,6 +243,9 @@
var_dump( $groupMember?->getFields());
// Output: []

var_dump( $groupMember?->getPersonFields());
// Output: []


$personGroupMember = $groupMember?->getPerson();
$personGroupMember = $groupMember?->requestPerson();
Expand Down Expand Up @@ -245,6 +318,13 @@
var_dump( $meeting->getDateTo());
// Output: "2022-11-09T18:30:00Z"

var_dump( $meeting->getDateFromAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2022-11-09 18:30:00"

var_dump( $meeting->getDateToAsDateTime()?->format("Y-m-d H:i:s"));
// Output: "2022-11-09 18:30:00"


var_dump( $meeting->getIsCompleted());
// Output: true

Expand Down
Loading