vran-dev / obsidian-contribution-graph

generate interactive gitxxx style contribution graph for obsidian, use it to track your goals, habits, or anything else you want to track.
Apache License 2.0
244 stars 5 forks source link

Date is in the incorrect position or number of days in the month are off #91

Open Zolo805 opened 3 months ago

Zolo805 commented 3 months ago

Sorry for so many changes, trying to solve the issue and seeing that I am not writing my issue clearly.

I am having a couple of issues. The first is that the number of days in the months is off by one. It also seems like the indexing of when the addon is reading the note is off by 1. The week should start with a Monday, also this month starts on a Monday, but it seems like it is putting it in Sunday first. I am not sure why the GIT look has that extra box starting on the bottom left Saturday.

Screenshot 2024-07-05 101925 Screenshot 2024-07-05 095721

vran-dev commented 3 months ago

Hi, show me your raw code or setting page

Zolo805 commented 3 months ago

Hopefully this is what you mean. Sorry if this isn't. Appreciate the help, your addon is amazing!

On Fri, Jul 5, 2024 at 8:42 PM vran @.***> wrote:

Hi, show me your raw code or setting page

— Reply to this email directly, view it on GitHub https://github.com/vran-dev/obsidian-contribution-graph/issues/91#issuecomment-2211618420, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJVY54G2UQLAPLGVEXLY7KTZK5RR7AVCNFSM6AAAAABKNONIXWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJRGYYTQNBSGA . You are receiving this because you authored the thread.Message ID: @.***>

-- This is a staff email account managed by Oxnard Union High School District.  This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender.

Zolo805 commented 3 months ago

OBS2 OBS1

shipmadison commented 3 months ago

I just started using your plugin, and I'm also experiencing a date indexing issue. The day of the week is off by one. For example, Monday, 7/15/2024 is reading as Sunday in the heatmap. I've attached a screenshot and my code. Thanks in advance! Other than this issue, love the plugin.

image

image

title: Energy
graphType: default
dateRangeValue: 90
dateRangeType: LATEST_DAYS
startOfWeek: "0"
showCellRuleIndicators: true
titleStyle:
  textAlign: center
  fontSize: 15px
  fontWeight: normal
dataSource:
  type: PAGE
  value: "#daily"
  dateField:
    type: PAGE_PROPERTY
    value: date
  countField:
    type: PAGE_PROPERTY
    value: energy
fillTheScreen: false
enableMainContainerShadow: false
cellStyleRules:
  - id: Halloween_d
    color: "#d94e49"
    min: "1"
    max: "2"
  - id: Halloween_c
    color: "#f07c44"
    min: 3
    max: 5
  - id: Halloween_b
    color: "#faaa53"
    min: "5"
    max: "7"
  - id: Halloween_a
    color: "#fdd577"
    min: "7"
    max: "999"
Araxiel commented 3 months ago

I also noticed the same issue.

image

contributionGraph
title: Contributions
graphType: month-track
dateRangeValue: 7
dateRangeType: LATEST_DAYS
startOfWeek: 0
showCellRuleIndicators: true
titleStyle:
  textAlign: left
  fontSize: 15px
  fontWeight: normal
dataSource:
  type: PAGE
  value: ""
  dateField: {}
fillTheScreen: false
enableMainContainerShadow: false
cellStyleRules: []

The type of view or first day of the week doesn't seem to matter, it's always a day off. If you need any additional info, I'm more than willing to help.

pedromzadeh commented 2 months ago

I have the same issue: date indexing is off by one. For instance, 2024-01-02 is a Tuesday, but it's getting assigned Monday.

Note: My indexing issue only exists with Git Style. This may indicate a labeling issue with this view instead of a more fundamental indexing issue.