Skip to content

Fix start_date_time/end_date_time formatting and typos across campaign examples - #575

Open
pattersonlois wants to merge 5 commits into
googleads:mainfrom
pattersonlois:fix-add-app-campaign-example
Open

pattersonlois wants to merge 5 commits into
googleads:mainfrom
pattersonlois:fix-add-app-campaign-example

Conversation

@pattersonlois

@pattersonlois pattersonlois commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor
  • Set end_date_time time component to 23:59:59 instead of 00:00:00 (required for daily granularity) and use ISO %Y-%m-%d date formatting for start_date_time and end_date_time across campaign creation examples (add_campaigns.rb, add_app_campaign.rb, add_performance_max_campaign.rb, add_performance_max_retail_campaign.rb, add_demand_gen_campaign.rb, add_dynamic_search_ads.rb, and add_responsive_search_ad_full.rb).
  • Fix commented AdImageAsset block variable typo in add_app_campaign.rb (aia.asset = instead of ala =), commented campaign block variable in add_responsive_search_ad_full.rb, and missing require 'date' in add_dynamic_search_ads.rb.
  • Use File.basename(__FILE__) in CLI usage banners across the updated campaign examples.

@pattersonlois
pattersonlois requested review from a team as code owners November 15, 2026 21:24
@pattersonlois
pattersonlois requested review from AnashOommen and Raibaz and removed request for a team November 15, 2026 21:24
@pattersonlois pattersonlois changed the title Fix end_date_time timestamp and typos in add_app_campaign.rb Fix start_date_time/end_date_time formatting and typos across campaign examples Nov 16, 2026
@pattersonlois

Copy link
Copy Markdown
Contributor Author

Following up on @dorasun's note: expanded this PR in fca11d4 to apply the same start_date_time / end_date_time (%Y-%m-%d 00:00:00 and %Y-%m-%d 23:59:59) and File.basename(__FILE__) banner fixes across the remaining campaign creation examples in the repo:

  • examples/basic_operations/add_campaigns.rb
  • examples/advanced_operations/add_performance_max_campaign.rb
  • examples/advanced_operations/add_demand_gen_campaign.rb
  • examples/advanced_operations/add_dynamic_search_ads.rb (also added missing require 'date')
  • examples/advanced_operations/add_responsive_search_ad_full.rb (also fixed #c. → # campaign. in the commented date lines)
  • examples/shopping_ads/add_performance_max_retail_campaign.rb

@pattersonlois

Copy link
Copy Markdown
Contributor Author

Two quick notes for review:

  • Updated in 4f86abd to capture today = Date.today once per campaign so start_date_time and end_date_time stay anchored to the same calendar day across midnight.
  • In examples/advanced_operations/add_responsive_search_ad_full.rb, this PR keeps its diff scoped to the commented start_date_time / end_date_time block and opts.banner. The pre-existing runtime issues in the rest of that file are addressed separately in Fix runtime errors in add_responsive_search_ad_full.rb #576, and both PRs merge cleanly in either order.

@Raibaz Raibaz added the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
@kokoro-team kokoro-team removed the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
@Raibaz Raibaz added the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
@kokoro-team kokoro-team removed the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants