Skip to content

Commit

Permalink
fix toString()
Browse files Browse the repository at this point in the history
Signed-off-by: Brian Downs <[email protected]>
  • Loading branch information
briandowns committed Sep 30, 2024
1 parent 1ba9bd6 commit 1058672
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/optionals/datetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ static Value datetimeFormat(DictuVM *vm, int argCount, Value *args) {
}

static Value datetimeToString(DictuVM *vm, int argCount, Value *args) {
if (argCount != 1) {
runtimeError(vm, "toString() takes 1 arguments (%d given)", argCount);
if (argCount != 0) {
runtimeError(vm, "toString() takes 0 arguments (%d given)", argCount);
return EMPTY_VAL;
}

Expand Down Expand Up @@ -407,7 +407,7 @@ static Value datetimeDayOfMonth(DictuVM *vm, int argCount, Value *args) {

static Value datetimeEqual(DictuVM *vm, int argCount, Value *args) {
if (argCount != 1) {
runtimeError(vm, "equal() takes 1 arguments (%d given)", argCount);
runtimeError(vm, "equal() takes 1 argument (%d given)", argCount);
return EMPTY_VAL;
}

Expand Down

0 comments on commit 1058672

Please sign in to comment.