# Space Scrip non working

**URL:** https://community.silverbullet.md/t/space-scrip-non-working/256
**Category:** General
**Created:** [February 26, 2024, 10:02am UTC](https://community.silverbullet.md/t/space-scrip-non-working/256 "2024-02-26T10:02:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Marco10x15](https://community.silverbullet.md/user_avatar/community.silverbullet.md/marco10x15/32/432_2.png) [@Marco10x15](https://community.silverbullet.md/u/Marco10x15)
#### Post date: [February 26, 2024, 10:02am UTC](https://community.silverbullet.md/t/space-scrip-non-working/256/1 "2024-02-26T10:02:25Z")

</div>

After a fresh reload to the 0.7.3 the previous Space-Script are non “registered”.  
Precedentemente usavo la funzione DaysTillDate.  
I have reloaded the system and also re-indexed .  
Any idea what to search / investigate?  
Thanks

Marco

---

<div class="post-metadata">

### Author: ![paletochen](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/p/cdc98d/32.png) [@paletochen](https://community.silverbullet.md/u/paletochen)
#### Post date: [February 26, 2024, 10:14am UTC](https://community.silverbullet.md/t/space-scrip-non-working/256/2 "2024-02-26T10:14:27Z")

</div>

Can you share the `space-script` itself?  
do you also get any errors in the browser inspect console?

I use DaysTillDate and it works for me.  
You can see it below.  
NOTE: I did update the signature but, as @zef mentioned in the [Changelog](https://silverbullet.md/CHANGELOG), the original script should also work.

````auto
```space-script
silverbullet.registerFunction({name: "daysTillDate"},(date) => {
  const parsedDate = Temporal.PlainDate.from(date)
  const now = Temporal.Now.plainDateISO();
  return now.until(parsedDate, { largestUnit: 'days' }).days
})
```

````

---

<div class="post-metadata">

### Author: ![Marco10x15](https://community.silverbullet.md/user_avatar/community.silverbullet.md/marco10x15/32/432_2.png) [@Marco10x15](https://community.silverbullet.md/u/Marco10x15)
#### Post date: [February 26, 2024, 10:40am UTC](https://community.silverbullet.md/t/space-scrip-non-working/256/3 "2024-02-26T10:40:34Z")

</div>

This are the image of what I get:

 ![image](https://community.silverbullet.md/uploads/default/original/1X/45e0cfa883f878f9250c200c99e2e9662e14e228.png)

 ![image](https://community.silverbullet.md/uploads/default/original/1X/10c97df037b01909291ab943fec29ea67eb4a12a.png)

Thanks  
Marco

---

<div class="post-metadata">

### Author: ![paletochen](https://community.silverbullet.md/letter_avatar_proxy/v4/letter/p/cdc98d/32.png) [@paletochen](https://community.silverbullet.md/u/paletochen)
#### Post date: [February 26, 2024, 10:46am UTC](https://community.silverbullet.md/t/space-scrip-non-working/256/4 "2024-02-26T10:46:17Z")

</div>

- Can you confirm with `Help: Version` that you are on the latest one?

Things that i will normally check, because often i make mistakes:

- Check that you don’t have a similar script somewhere else, searching for `daysTillDate`
- remove the space-script and check that no more errors appear in the console, and therefore confirming if that script is the sole reason of the problem or not
- If it is, maybe add the script in a new page, maybe something weird is happening with the current one?

---

<div class="post-metadata">

### Author: ![Marco10x15](https://community.silverbullet.md/user_avatar/community.silverbullet.md/marco10x15/32/432_2.png) [@Marco10x15](https://community.silverbullet.md/u/Marco10x15)
#### Post date: [February 26, 2024, 11:07am UTC](https://community.silverbullet.md/t/space-scrip-non-working/256/5 "2024-02-26T11:07:18Z")

</div>

> [@paletochen](#):
>
> - Check that you don’t have a similar script somewhere else, searching for `daysTillDate`

That was my mistake!  
Now is working!  
Thanks  
Marco
