# new format character in date function

- Thread: https://externals.io/message/6702
- Original archive: https://news-web.php.net/php.internals/6702
- Started by zsolt.banyai@kirowski.com on 2003-12-23T13:42:27+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #6702 — zsolt.banyai@kirowski.com — 2003-12-23T13:42:27+00:00

URL: https://externals.io/message/6702#6702

Hi,

I usually have to work with dates and i miss a date format character
wich returns year of the week. I'm not a C developer, i could just play
with it in datetime.c, but i send the patch file, please check this and
if you are interest in it, use in the future.

About the working:
in case 01/01/2003 returns 2003
in case 31/12/2003 returns 2004

the format character is X.

thanks

zsolt banyai [bazso]
kirowski rt.
hungary

---

## #6723 — Derick Rethans — 2003-12-29T10:55:31+00:00

URL: https://externals.io/message/6702#6723

> The funcionality is the same. But i think it could have place in the
> `date()` function... or no? :)

If it's the same why add a new modifier?

Derick

---

## #6725 — jason davidson — 2003-12-29T15:33:10+00:00

URL: https://externals.io/message/6702#6725 · In reply to: #6723

Derick Rethans wrote:

>
>
>  
>
> > […]
>
>If it's the same why add a new modifier?
>
>Derick
>
>  
>
I agree date should have it, week of year is a common format for a date 
function to return, i was surprised to see it wasnt in there.

Jason

---

## #6726 — Sara Golemon — 2003-12-29T16:47:14+00:00

URL: https://externals.io/message/6702#6726 · In reply to: #6725

> > […]
> I agree date should have it, week of year is a common format for a date
> function to return, i was surprised to see it wasnt in there.
>
I didn't mean to imply it didn't belong in `date()` simply because it already
existed in `strftime()`, I just wanted to make sure I understood what was
being asked for.

+1

-Sara

---

## #6727 — js@iksz.hu — 2003-12-29T20:28:58+00:00

URL: https://externals.io/message/6702#6727 · In reply to: #6723

> If it's the same why add a new modifier?

To invert the question: why `date()` exists? Life should be more simpler. 
  Besides, you have to set C LANG whether some texty date representation 
comes.
-- 
jul
